Setup ProFTP On Your Linux Server In 5 Easy Steps!

So far we've configured LAMP stack on our server, created two websites utilizing Virtual Hosts and set up MariaDB databases for them.

So, it's time to get to why we've been doing all this to being with: uploading your real website files to the server and test it. How do we go about doing it?

Now sure, you can connect to the server with the WinSCP tool using your SSH ‘root’ credentials and just upload the files. But in the real world, if you ever need to allow access for another user, this is something you should avoid doing for security reasons.

Ok, first let’s install and configure ProFTPd server:

[root@ServerSuit ~]# yum install proFTPd

We need to create a user for proFTPd server too as it's created by default, as well as add a line to the ‘/etc/hosts’ file to make sure that service will listen through the right interface:

[root@ServerSuit~]# useradd proftpd -s /dev/null
[root@ServerSuit~]# echo "<your_server_ip> ServerSuit" >> /etc/hosts

Then you’ll need to edit a few lines in ‘/etc/proftpd.conf’:

User proftpd
Group proFTPd
ServerName "ServerSuit"

And finally we can start our service:

[root@ServerSuit ~]# service proftpd start
Starting proftpd:    [  OK  ]

Set it to allow to run at boot:

[root@ServerSuit ~]# chkconfig proftpd on

And we need to allow incoming connections to FTP ports 20-21 just the way we did it for HTTP connections before:

[root@ServerSuit ~]# iptables -I INPUT 1 -p tcp --dport 20 -j ACCEPT
[root@ServerSuit ~]# iptables -I INPUT 2 -p tcp --dport 21 -j ACCEPT
[root@ServerSuit ~]# iptables-save > /etc/sysconfig/iptables

This can get kind of annoying, but fortunately we're almost finished. Lastly, we need is create a user- and password- to login via FTP. We also need to make sure that user will have permissions for his home directory:

[root@ServerSuit ~]# useradd --home-dir /var/www/ServerSuitTheBest  \ --shell /sbin/nologin ftp-user
[root@ServerSuit ~]# passwd ftp-user
[root@ServerSuit ~]# chown ftp-user:ftp-user /var/www/ServerSuitTheBest –R
[root@ServerSuit ~]# service proftpd restart

Please note that we provided a parameter “--shell /sbin/nologin”. It ensures that user can’t ever login to server via SSH.
You now able to login via FTP to the server, and you only have access to your website folder!
Wanna make this process easier and make all your problems go away? Well the setup process can get as quick as a click with ServerSuit. All you need is install the basic LAMP software package with ProFTP already included and preconfigured. 
Or you can install ProFTPd as separate software package if you didn’t need LAMP stack but still need FTP service on your server! All you need then is create new user at the dashboard, give it home directory and make sure that you check ‘FTP access’ at user properties below.

You can stay updated with our news, updates, and tutorials by following us on Twitter and Facebook! Stay tuned for more to come!

March 10 2016

Add or review comments

Please leave your comment

Existing comments

Comments 3


Sabrina Warren
Hello my name is Sabrina Warren and I just wanted to drop you a quick note here instead of calling you. I discovered your Setup ProFTP On Your Linux Server In 5 Easy Steps! | ServerSuit website and noticed you could have a lot more traffic. I have found that the key to running a successful website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get keyword targeted traffic from and they let you try their service for free for 7 days. I managed to get over 300 targeted visitors to day to my site. http://deaf.im/zyr-x
Sabrina Warren
Hi my name is Sabrina Warren and I just wanted to drop you a quick note here instead of calling you. I came to your Setup ProFTP On Your Linux Server In 5 Easy Steps! | ServerSuit page and noticed you could have a lot more hits. I have found that the key to running a popular website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get keyword targeted traffic from and they let you try their service for free for 7 days. I managed to get over 300 targeted visitors to day to my website. http://bbqr.me/4g5j
Vickie Figueroa
I was just looking at your ProFTP Setup On Linux Server| Linux Management Tips|ServerSuit website and see that your website has the potential to get a lot of visitors. I just want to tell you, In case you don't already know... There is a website network which already has more than 16 million users, and the majority of the users are looking for websites like yours. By getting your site on this service you have a chance to get your site more visitors than you can imagine. It is free to sign up and you can read more about it here: http://smpl.city/events/7Yypu - Now, let me ask you... Do you need your website to be successful to maintain your way of life? Do you need targeted traffic who are interested in the services and products you offer? Are looking for exposure, to increase sales, and to quickly develop awareness for your site? If your answer is YES, you can achieve these things only if you get your site on the service I am describing. This traffic network advertises you to thousands, while also giving you a chance to test the service before paying anything at all. All the popular sites are using this service to boost their traffic and ad revenue! Why aren’t you? And what is better than traffic? It’s recurring traffic! That's how running a successful website works... Here's to your success! Find out more here: https://fsuh.de/yourls/Q

Get notified about new publications and product updates.
Please note we do not share information to anyone.