Create a local nologin account mapped to the server during Virtual Account logon:
# Useradd virtualftp-d/data/resources/ftpdata/-s/sbin/nologin-M
# Chown virtualftp. virtualftp/data/resources/ftpdata/
Create a ing between the virtual account and the local account on the server:
# Cd/usr/local/pureftpd/bin/
#./Pure-pw useradd user1-u virtualftp-g virtualftp-d/data/resources/ftpdata/user1-m
Note:
User1 is the user name,-u virtualftp is the actual linux user,-d specifies the starting directory, and is locked in this directory. If not locked, use-D. If you need different permissions, you can create a new linux user and group. If you use the ftp user that comes with the system, in this case, you also need to modify the MinUID in the configuration file pure-ftpd.conf to the UID 14 of the ftp user, otherwise the 530 error will occur during login; so it is recommended to create another non-system built-in user for ING.
Create a user database:
#./Pure-pw mkdb/usr/local/pureftpd/pureftpf. pdb
II. Install PureAdmin web management
Click my Download: PureAdmin-0.3.tar.gz
# Tar-zxvf PureAdmin-0.3.tar.gz
# Music PureAdmin-0.3/var/www/html/pureadmin
Import the data file pureftp. SQL to the MySQL database. Because MYSQL 5.1 and later versions are used in the mini series, the PureAdmin table structure engine is not fully compatible and needs to be modified.
Note: make the following changes before import.
Insert into mysql. user (Host, User, Password, Select_priv, primary, Update_priv, Delete_priv, Create_priv, Drop_priv, primary, File_priv, Grant_priv, primary, Index_priv, Alter_priv, primary, x509_subject) VALUES ('localhost', 'ftp ', PASSWORD ('passwd'), 'y', 'n ', 'N', 'n', Y ', 'Y', 'y ');
Flush privileges;
Create database ftpusers;
USE ftpusers;
Create table admin (
Username varchar (35) not null default '',
Password char (32) binary not null default '',
Primary key (Username)
);
Insert into admin VALUES ('admin', MD5 ('20140901 '));
Create table 'users '(
'User' varchar (16) not null default '',
'Password' varchar (32) binary not null default '',
'Uid' int (11) not null default '14 ',
'Gid' int (11) not null default '5 ',
'Dir' varchar (128) not null default '',
'Quotafiles' int (10) not null default '123 ',
'Quotasize 'Int (10) not null default '30 ',
'Ulbandwidth' int (10) not null default '80 ',
'Dlbandwidth' int (10) not null default '80 ',
'Ipaddress' varchar (15) not null default '*',
'Comment' tinytext,
'Status' enum ('0', '1') not null default '1 ',
'Ulratio 'smallint (5) not null default '1 ',
'Dlatio 'smallint (5) not null default '1 ',
Primary key ('user '),
Unique key 'user' ('user ')
);
Import data and authorize:
#/Etc/init. d/mysqld start
# Mysql-rroot-p <pureftp. SQL
Mysql> grant all privileges on ftpusers. * to ftp @ localhost identified by 'tmppasswd ';
Mysql> flush privileges;
Mysql> quit
Modify the pureadmin configuration file and database parameters:
# Vim/var/www/html/pureadmin/config. php
Configure the pureftpd-mysql.conf connection database file:
# Cp/usr/local/src/pure-ftpd-1.0.36/usr/local/pureftpd/etc/
# Vim/usr/local/pureftpd/etc/pureftpd-mysql.conf
III. Browser logon test
Http: // 10.163.11.252/pureadmin (username: admin, password: 123456)