VsFTP Server Configuration

  • Install the RPM vsftpd
  • The config file is:

vi /etc/vsftpd/vsftpd.conf

anonymous_enable=NO               # (Donot Allow anonymous access)
local_enable=YES               # (Allow local users to login)
write_enable=YES               # (To allow any form of write FTP command)
local_umask=022
file_open_mode=0777
anon_world_readable_only=YES               # (Anonymous Login can read only)
anon_upload_enable=YES               # (If you want to allow anonymous user to upload on your server)
anon_mkdir_write_enable=YES               # (If you want to allow anonymous user to create directories)
dirmessage_enable=YES               # (If you want that it gives ftp users messages when they traverse directories)
xferlog_enable=YES               # (Activate logging of FTP Uploads/Downloads)
connect_from_port_20=YES               # (Make sure port transfer connections originate from port 20)
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log               # (Location where FTP log files will be saved)
idle_session_timeout=600               # (You may change it)
data_connection_timeout=120               # (You may change it)
ftpd_banner=Hello
listen=YES               # (when it is enabled vsftpd runs in standalone mode & listens on IPV4 sockets)
listen_ipv6=YES               # (It enables listening on IPV6 sockets)
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
max_clients=2               # (If you want to restrict number of connections to your server)
max_per_ip=2               # (If you want to restrict number of connections to your server each IP Address can connect)
pasv_enable=YES               # (To Enable Passive connections (Recommended ON to avoid firewall problems)
chroot_local_user=YES               # (Restrict Local Users not to change their home directories)

  • chkconfig vsftpd on
  • useradd -s /sbin/nologin sushant
  • Default sharing file: /var/ftp/pub

Leave a Reply

Your email address will not be published. Required fields are marked *