Build MySQL-based pure-ftpd in Ubuntu

Source: Internet
Author: User
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...

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.