Building FTP server in linux

Recently I try to connect my PHPstorm to my virtual server. And I figure out that PHPstorm has a Deploying function. It allow user to deploy committed changes to a remote server.
Here is a link of Deploying configuration:

It seems that I have to use ftp to upload my files to the server.
Here is some simple steps to setup the ftp server in linux

Typing in the followed command:

sudo apt-get install vsftpd


Open the FTP server configuration file.

cd /etc/
vim vsftpd.conf

In the vsftpd.conf , we need to change several things.


NOTICE:we must set local_enable=YES,otherwise the ftp server will only allow anonymous visiting.


Create FTP user on server


useradd -m -G ftp -s /sbin/nologin -d /home/user newuser
passwd newuser

NOTICE:-s /sbin/nologin will not allow new user to login the server,

                -d /home/newuser will set default path for newuser

For existing user you should do:

usermod newuser -G ftp -d /home/newuser

Then remember to restart server:

service vsftpd restart 
sudo /etc/init.d/vsftpd restart

If you want to use ftp on another PC,typing in : ftp

Leave a Reply

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