Setting vsftpd FTP on Ubuntu Jaunty (9.04)

vsftpd is a GPL licensed FTP server for UNIX systems, including Ubuntu. To use vsftpd on ubuntu jaunty follow these steps:

1. Install vsftpd type command in terminal as root :


$ apt-get install vsftpd

2. Edit file configuration at /etc/vstpd.conf

$ gedit /etc/vstpd.conf

Replace the word below :

anonymous_enable=YES

Change with :

anonymous_enable=NO

Then Save

Configuration file has anomim will prohibit access to your FTP server for security reasons.

#local_enable=YES

3. Adding a “fake” shell

Edit /etc/shells file and add a non-existent shell name like /bin/false, for example. This fake shell will limit access on the system for FTP users.


$ gedit /etc/shells


# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/false

4. Setup FTP user account

For users of FTP that you do not have access to a shell account on your ubuntu system and Use the following command to create a user account in directory /etc/passwd .


$ mkdir -p /home/ftp/ftpuser
$ useradd ftpuser -d /home/ftp/ftpuser/ -s /bin/false
$ passwd ftpuser

Once you’ve made these changes, restart the vsftpd service with this command:


$ /etc/init.d/vsftpd restart

5. Replace file configuration specified in the manual page on a per_user

If you want to make custom changes in the behaviour of the ftp server on a per-user basis, you should know that vsftpd has a powerful option that allows you to do this.
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 detailed in the manual!
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.

Happy Testing.....!!!

No comments:

Post a Comment

Please Comment...!!