Combined Use of Pureftp and mysql

Source: Internet
Author: User
Tags crypt

PureftpdIt is an open source code software that is used on multiple types of Unix and complies with the GPL protocol. What is the combination of Pureftp and mysql.

I use 5.0.20a for the database, but we recommend that you use 4.0 for the database, which is much less troublesome than coding.

Mysql-p // log on to the mysql server

Create database pureftpd;

Grant all on pureftpd. * to pureftp @ localhost identified '********';

Se pureftpd

Create table 'users '(

 
 
  1. `id` int(32) unsigned NOT NULL auto_increment,  
  2.  
  3. `User` varchar(16) NOT NULL default '',  
  4.  
  5. `Password` varchar(64) NOT NULL default '',  
  6.  
  7. `Uid` varchar(11) NOT NULL default '-1',  
  8.  
  9. `Gid` varchar(11) NOT NULL default '-1',  
  10.  
  11. `Dir` varchar(128) NOT NULL default '',  
  12.  
  13. `QuotaSize` smallint(5) NOT NULL default '0',  
  14.  
  15. `QuotaFiles` int(11) NOT NULL default '0',  
  16.  
  17. `ULBandwidth` smallint(5) NOT NULL default '0',  
  18.  
  19. `DLBandwidth` smallint(5) NOT NULL default '0',  
  20.  
  21. `ULRatio` smallint(6) NOT NULL default '0',  
  22.  
  23. `DLRatio` smallint(6) NOT NULL default '0',  
  24.  
  25. `comment` tinytext NOT NULL,  
  26.  
  27. `ipaccess` varchar(15) NOT NULL default '*',  
  28.  
  29. `status` enum('0','1') NOT NULL default '0',  
  30.  
  31. `create_date` datetime NOT NULL default '0000-00-00 00:00:00',  
  32.  
  33. `modify_date` datetime NOT NULL default '0000-00-00 00:00:00',  

Primary key ('id', 'user '),

Unique key 'user' ('user ')

) TYPE = MyISAM AUTO_INCREMENT = 5; // create a pureftpd Database

> Insert into 'users' VALUES (1, 'test', encrypt ('test'), '123456', '/var/ftp/test', 0, 0, 0, 0, 0, 0, '', '*', '1', '2017-11-27 10:10:00 ', '2017-11-27 10:10:00 '); // create an ftp user

In this way, we have established the pureftpd database. Below we modify the/usr/local/pureftpd/etc/pureftpd-mysql.conf file.

MYSQLServer localhost

MYSQLPort 3306

MYSQLSocket/tmp/mysql. sock

MYSQLUser pureftp

MYSQLPassword ******* // enter your password here

MYSQLDatabase pureftpd

MYSQLCrypt crypt // password encryption method. We chose crypt. There are several other methods in the same principle. For details, refer.

Search for the following characters and remove the # above

MySQLGetQTAFS

MySQLGetQTASZ

MySQLGetBandwidthUL

MySQLGetBandwidthDL

Save and exit

 
 
  1. # vi /usr/local/pureftpd/etc/pure-ftpd.conf  

Change one.

MySQLConfigFile/usr/local/pureftpd/etc/pureftpd-mysql.conf // set the mysql File

Others can be modified as required.

OK, create the main directory/var/ftp/test. It must have the read and write permissions of everyone. Therefore, I use chmod 777/var/ftp/test and start the test, can be uploaded, downloaded, or deleted. If you do not want to delete or upload a file, you can set the permission to 555, and you can only download the file.

  • Pureftpd command syntax
  • Virtual user support for Pureftpd Configuration
  • Pureftpd configuration for real users
  • Anonymous user login for Pureftpd Configuration
  • Pureftpd installation documentation
  • PureFTPd configuration file
  • PureFTPd displayrate () Remote Denial of Service Attack Vulnerability

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.