PROFTPD virtual user – quick howto

It was boring to look for it in PROFTPD docs – but I could not found quick FAQ so I had no choice. Anyway I decided to write it for others who need quick tip. Here is just 4 simple steps.

1. Download “ftpasswd” perl script and chmod it to 755:

wget http://www.castaglia.org/proftpd/contrib/ftpasswd
chmod 755 ftpasswd

2. Create file with your virtual user and ftp group

mkdir /etc/proftpd
ftpasswd --passwd --name=ftp_login --home=/home/ftp/ftp_login --shell=/bin/false --uid=1003
ftpasswd --group --name=ftp_group --gid=50 --member=ftp_login

(it is not important what UID and GID you will use as long as it does not have root privileges :), just use any system uid and group and proftpd will write files with it’s privileges)

3. Add this to your proftpd.conf file:

RequireValidShell  off
AuthUserFile  /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group

4. Restart PROFTPD

killall -HUP proftpd

That’s all! Any questions? Post it below ;)

9 Responses to “PROFTPD virtual user – quick howto”


  • You rock! Was so bored with those freaking docs and you had a concise howto. Thank you!

  • Great:) Thanks for this howto.
    .-= nessip´s last blog ..Mam talent =-.

  • How do I change the permission to write for a virtual user? I just want one ftp-account to access the /var/www directory.

    Thanks in advance.

  • Just a quick note for anyone who might be having trouble: When i tried this procedure the two files
    ftpd.passwd and
    ftpd.group

    were created in my home directory, so I had to copy them into /etc/proftpd/ before I got it to work:

    “mv ~/ftpd.* /etc/proftpd/”

    Restarted FTP (which in my case I had to via xinetd (“/etc/init.d/xinetd restart” ) and it worked fine!!!

    To make sure that no user is able to go outside of their home directory (so that they are ‘sandboxed’ in), additionally add this to proftpd.conf:

    DefaultRoot ~

  • hi, i downloaded the file and im in the correct directory:

    but i get:

    “ftpasswd: command not found”

    im running debian. any help?

  • Im trying to get the ftpasswd to work on CentOS 32-bit, but when i try ftpasswd. I get errors in the script …

    ftpasswd: line 28: use: command not found
    ftpasswd: line 30: syntax error near unexpected token `(‘
    ftpasswd: line 30: `use File::Basename qw(basename);’

    Any ideas?

  • Very good howto. All is working just fine :-)

Leave a Reply