How to set up proftpd in Linux

This post is a guideline that I use to set up proftpd in a linux server.

 I create a user group for FTP users and assign a specific home folder where the WEB is located.

 I am using Debian Jessy.
First step install package:


apt-get install proftpd-basic

Edit config file and add the following lines


nano /etc/proftpd/proftpd.conf


<Global>
    RequireValidShell off
</Global>

DefaultRoot ~ ftpuser

<Limit LOGIN>
    DenyGroup !ftpuser
</Limit>

This way we will handle ftp users by adding them to a group ftpuser without a valid shell. They will also be jailed in the user’s own home directory.

Create new group, user and asign him the home directory. I am using /var/www/wordpress_one as home directory.


addgroup ftpuser
adduser ftpuserone -shell /bin/false -home /var/www/wordpress_one
adduser ftpuserone ftpuser

Change the group permissions of the folder so apache or other web servers can work with it. Apply also the default group for new files created. This is usefull when wordpress or other program create new files.


chown ftpuserone:www-data wordpress_one/
chmod g+s wordpress_one/

Restart the service and test the user


service proftpd restart

ftp -nv yourftpdomain.com
220 ProFTPD 1.3.5b Server (Debian)
ftp> user ftpuserone
331 Password required for ftpuserone
Password: 
230 User ftpuserone logged in
Remote system type is UNIX.

Now web files can be uploaded over ftp directly.

One Reply to “How to set up proftpd in Linux”

Leave a Reply

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