So it’s close to a half a year since I started maintaining my own CentOS server, but did not set up a FTP server on it, therefore file transfers were quite tedious to accomplish.
So I went on googling about a lightweight linux ftp server and I stumbled upon vsftp and I thought I could make use of it as a service (vsftpd).
But before you think about setting a FTP server you might want to check on whether or not you already have one already opened (which was in my case).
You could check for the processes running the following command:
netstat -tulnp|grep :21
If you find that you have one already functioning and running you might want to check how to configure it and make use of it otherwise you could make use of vsftpd.
First proceed with installing the server which is as simple as:
yum install vsftpd
Then configure it for your need. You might want to make it as secure as possible, if that’s the case follow these steps then take a closer look at the reference.
Edit the configuration file /etc/vsftpd/vsftpd.conf with your editor of choice and modify the following:
Then prepare a user for FTP use:
useradd -d /var/www/path/to/your/dir ftpuser
And give it access to the FTP root directory:
chown -R ftpuser /var/www/path/to/your/dir
sudo chmod 775 /var/www/path/to/your/dir
When ready you can start your service with:
service vsftpd start
and make it automatically start at boot time with:
chkconfig vsftpd on