First add in proftpd.conf:
Authorder mod_auth_file.c mod_auth_unix.c
authuserfile/usr/local/etc/ftpd.passwd
#AuthGroupFile/usr/local/etc/ftpd.group
Then restart the PORTFTPD service
Service PROFTPD Restart
Authorder is the FTP user authentication order. MOD_AUTH_FILE.C is proftpd virtual user authentication, virtual user and group information is stored in AuthUserFile and authgroupfile specified files below, but I want to make it simple, so I'm not going to have a virtual group. MOD_AUTH_UNIX.C is System user authentication, or/etc/passwd.
Then add a new virtual user with the following command:
FTPASSWD--passwd--file=/usr/local/etc/ftpd.passwd--name=test--uid=1002--home=/usr/local/ftp/test--shell=/usr/ Sbin/nologin
–PASSWD specifies the creation of a new virtual user, –group establishes a virtual group;
–FILE Specifies the file that stores the virtual user;
–NAME Specifies the user name of this virtual user, and the password is required to be entered when the command executes;
–UID Specifies the UID of the system user for this virtual user, which will read and write the file as this system uid;
–HOME specifies the root directory of this virtual user, which is the root directory after its login to FTP;
–shell Specifies the shell of this virtual user and, for security purposes, specifies a non-landing shell.
If it is the source installation PROFTPD, the service item proftpd and the command ftpasswd in the following two directories respectively
FTPASSWD: Source Package Directory/CONTRIB/FTPASSWD
PROFTPD Service Program: Source package Directory/contrib/dist/rpm/proftpd.init.d
Plus executable permissions. Then copy the ftpasswd to the/usr/local/sbin directory.
Copy Proftpd.init.d to/etc/init.d/under Rename to Proftpd
ProFTP Setting up virtual users (GO)