Vsftpd Upload Only For That User

Question 1:

I want to create a user. Lets call him Bob. I want Bob to be able to ftp into my ftp server. He should be immediately put into the /upload folder and then only have access to upload files, not download anything from inside of there.

Answer 1:

user_config_dir

This powerful option allows the override of any config option specified in the manual page, on a per-user basis. Usage is simple, and is best illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page! 

PLEASE NOTE that not all settings are effective on a per-user basis. For example, many settings only prior to the user's session being started. Examples of settings which will not affect any behviour on a per-user basis include listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc.

Default: (none)

Note:

In the user conf for bob allow uploads, set root to the upload folder and permit write only no read to it.
 

Question 2:

Linux Create An FTP User Account

Now your FTP server is up and running. It is time to add additional users to FTP server so that they can login into account to upload / download files. 

Answer 2:

To add a user called tom and set the password, enter:

# adduser -c 'FTP USER Tom' -m tom
# passwd tom

Now tom can login using our ftp server. Make sure the following is set in vsftpd.conf

local_enable=YESRestart the vftpd:

# service vsftpd restart

Linux Tips

Quick Links:
Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Hints and Tips on: Linux System Administration

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.