Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.29 KB

ftp.markdown

File metadata and controls

44 lines (29 loc) · 1.29 KB

FTP

proftpd

  • By default proftpd use system users and passwords in /etc/passwd for login;
  • We can create virtual ftp-only users as well, which is accomplished by using the ftpasswd command;

Create a ftp user and group

  1. Create the user and group, use the uid and gid of default webserver user (33)

    cd /etc/proftpd/
    
    # create a group
    ftpasswd --group --name ftpgroup --gid 33
    
    # create a user
    ftpasswd --passwd --name wordpressuser --home /var/www/wordpressuser_home/ --shell /bin/false --uid 33 --gid 33
  2. Make sure the output files ftpd.passwd and ftpd.group are readable by the ProFTPD user (proftpd by default);

  3. In the config file /etc/proftpd/proftpd.conf:

    RequireValidShell   off
    
    # only use the following files for auth, do not use system users (mod_auth_unix.c)
    AuthOrder mod_auth_file.c
    AuthUserFile /etc/proftpd/ftpd.passwd
    AuthGroupFile /etc/proftpd/ftpd.group

Refs: