How to Setup VSFTPD for FTP accounts.
Description:
"VSFTPD is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast. It is stable. Don't take my word for it, though. Below, we will see evidence supporting all three assertions. We will also see a list of a few important sites which are happily using vsftpd. This demonstrates vsftpd is a mature and trusted solution.
Features:
Despite being small for purposes of speed and security, many more complicated FTP setups are achievable with vsftpd! By no means an exclusive list, vsftpd will handle:
* Virtual IP configurations
* Virtual users
* Standalone or inetd operation
* Powerful per-user configurability
* Bandwidth throttling
* Per-source-IP configurability
* Per-source-IP limits
* IPv6
* Encryption support through SSL integration
NOTE: Please read this page as a reference before continuing on. As it may help, some references might relate to Ubuntu Linux.
I wont go over how to install vsftpd but for the sake of Ubuntu fans, enter in:
sudo apt-get install vsftpd
First lets find the configuration file of vsftpd
-For ubuntu users, its located at "/etc/vsftpd.conf"
-For others, you can issue the locate / find command:
locate vsftpd | grep conf
Now lets edit vsftpd.conf using your favourite text editor, mine is nano.
sudo nano /etc/vsftpd.conf
I will run over the configuration file on some important settings:
Anonymous enable: This enables Anonymous ftp login, I suggest you disable this option unless you have certain files that you want to share with the everyone in the world.
anonymous_enable=NO
local_enable: Do you want local users on your system to be enabled to log in?
local_enable=YES
write_enable: Change this to yes if you want to allow uploads and file changes
write_enable=YES
chroot_local_user: This restrict users to their home directory, I suggest you turn this on.
chroot_local_user=YES
chroot list: If you enabled chroot_list_enable to yes then the list file becomes a file where you can put names of users who you 'dont' want to restrict to their home directory.
chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list
You might need to create a 'vsftpd.chroot_list' in /etc directory or where ever you want.
secure_chroot_dir: If you enabled chrooting users to their home directory, then you must create empty directory which isn't owned by any of the ftp users. In my case, I used '/var/run/vsftpd' which is owned by root.
secure_chroot_dir=/var/run/vsftpd
local_max_rate: You can limit fast users can download from your ftp server, my upload speed is bout 100kb/s, to leave head room for my personal and other server use, I halfed it.
local_max_rate=50000
max_clients: How many users do you want at the same time? I limited it to about 2.
max_clients=2
max_per_ip: How many logins do you allow from the same IP address at a time. I personally used 1
max_per_ip=1
Restart VSFTPD to take effect:
sudo /etc/init.d/vsftpd restart
If you want users to access other file's/directory's like out of their home location and still want to restrict them every where else then read this
Comments
Hi im using an Ubuntu 7.10
Try referring to
need help to login with vsftpd
Post new comment