Step 1: Install pure-ftpd and pure-ftpd-mysql.apt-getinstallpure-ftpdapt-getinstallpure-ftpd-mysql Step 2: Modify the pure-ftpd Link
Step 1: install pure-ftpd and pure-ftpd-mysql.apt-get install pure-ftpdapt-get install pure-ftpd-mysql Step 2: Modify the pure-ftpd Link
Step 1: Install pure-ftpd and pure-ftpd-mysql.
Apt-get install pure-ftpd
Apt-get install pure-ftpd-mysql
Step 2: Modify the password of mysql linked to pure-ftpd
Vim/etc/pure-ftpd/db/mysql. conf
Default Configuration: # MYSQLServer localhost
# MYSQLPort 3306
MYSQLSocket/tmp/mysql. sock
MYSQLUser root
MYSQLPassword enter your password here
MYSQLDatabase pureftpd
MYSQLCrypt cleartext
MYSQLGetPW SELECT Password FROM users WHERE User = "\ L"
MYSQLGetUID SELECT Uid FROM users WHERE User = "\ L"
MYSQLGetGID SELECT Gid FROM users WHERE User = "\ L"
MYSQLGetDir SELECT Dir FROM users WHERE User = "\ L"
Step 3: create a management database:
Msyql-u root-p
Enter the mysql password
Mysql> create database pureftpd;
Mysql> use pureftpd;
Create a users table:
Create table users (
User CHAR (32) binary not null,
Password CHAR (64) binary not null,
Uid INT (11) not null default '-1 ′,
Gid INT (11) not null default '-1 ′,
Dir CHAR (256) binary not null,
Primary key (User)
);
Step 4: create users and directories
Groupadd www
Useradd-g www
Mkdir-p directory location (for example, my directory is/data)
Chown-R www: www directory location (for example, my path is/data)
Obtain the user id and group id of the Group
Id www
Result: uid = 1001 (www) gid = 1001 (www) groups = 1001 (www)
Insert user data into the database for verification
Insert into users values ('www ', '000000', 1001,1001,'/data ');
The values correspond to the user name and password respectively. uid gid operation directory
Step 5: restart pure-ftpd
/Etc/init. d/pure-ftpd restart
In this way, your server supports ftp...
,