Tag Info

New answers tagged


Run this command: useradd -d ftp_user:chown 711 /etc/init.d/


After you've changed your config to include chroot_local_user=YES You could change the user's shell to /usr/sbin/nologin so that if the password leaks you will have mitigated some risk (set the home directory too) usermod -d /var/www/my.domain.example -s /usr/sbin/nologin exampleuser -d, --home HOME_DIR The user’s new login ...


While L.D.James' answer (no longer here) put me onto the whole users and groups issue it was not wholly helpful. Thankfully it was enough to get Google involved. Here are the steps I took to solve the problem. The folder was owned by root which would not be a good group to add a user to. The solution was to create a special group. I called it "www" because ...


There is a program to interact with interactive command line tools exactly like the ftp example: expect. It is very powerful, but you may get away without learning everything about it. A very useful tool is autoexpect, which can record an interactive session as an expect script. The recorded script is certainly helpful to understand the basics. I think ...


You can use gnu/screen for this purpose. Invoke screen and start your script. Detach screen after invoking your script and it will run as long as the system is on. Attach the screen back to terminal when you need to get back to the running script. Google should pull up screen tutorials and cheatsheets to get you started.


As long as your system is up, the script will keep running, it will not stop as long as you don't log out of the system. Locking your screen will not stop the script.


Do NOT set up a writable FTP server. The amount of security in FTP can be described as "none"; depending on when the probe hits you you may start hosting malware within minutes, and isolating the uploads directory is entirely wrong approach to this problem. Although it's possible to tunnel over TLS, it's even better to switch to a different technology like ...


I suspect part of your issue is with the way you're constructed your heredoc. Try it like so: $ ftp -n ${FTP_HOST} << STOP user ${FTP_USERNAME} ${FTP_PASSWORD} binary lcd ${FTP_FROM_DIR} cd ${FTP_TO_DIR} put ${reportFileName} STOP If you truly want those spaces/tabs in the command then you'll need to change to this form of the heredoc: $ ftp -n ...

Top 50 recent answers are included