Setup a File Only Upload FTP Server with vsftpd

This post describes how to setup a FTP server using vsftpd 2.0.5 in CentOS with the ability to allow anonymous users to upload files and don’t have the ability to create directory. You can use this FTP server as a public dropbox to share files. If users would like to upload directory, you can suggest them to zip the directory and they can upload them as a file.

Pre-requisite Check
Run the command below to query for vsftpd rpm: -

rpm -qa vsftpd

If vsftpd is not installed, you can use yum to install it using the command below: -

yum install vsftpd

Initial Configuration
The configuration directory of vsftpd is located in /etc/vsftpd path. It is advisable to backup the good known configuration files for easier quick restoration. Run the command below: 


cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.original

Enable Anonymous User
Change the following parameter below in your /etc/vsftpd/vsftpd.conf file to enable anonymous users access: -

anonymous_enable=YES

Change the following parameter below in your /etc/vsftpd/vsftpd.conf file to enable anonymous users to have upload and download access: -

write_enable=YES
anon_upload_enable=YES
anon_umask=022

Create An Upload Directory
You need to create a special upload directory using the command below: -

mkdir /var/ftp/pub/incoming
chown ftp:ftp /var/ftp/pub/incoming

Restart vsftpd Service
You need to restart vsftpd to take effect using the command below: -

service vsftpd restart

You may now use FileZilla to connect to this file only sharing FTP server.

0 comments:

Post a Comment