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 '(
- `id` int(32) unsigned NOT NULL auto_increment,
-
- `User` varchar(16) NOT NULL default '',
-
- `Password` varchar(64) NOT NULL default '',
-
- `Uid` varchar(11) NOT NULL default '-1',
-
- `Gid` varchar(11) NOT NULL default '-1',
-
- `Dir` varchar(128) NOT NULL default '',
-
- `QuotaSize` smallint(5) NOT NULL default '0',
-
- `QuotaFiles` int(11) NOT NULL default '0',
-
- `ULBandwidth` smallint(5) NOT NULL default '0',
-
- `DLBandwidth` smallint(5) NOT NULL default '0',
-
- `ULRatio` smallint(6) NOT NULL default '0',
-
- `DLRatio` smallint(6) NOT NULL default '0',
-
- `comment` tinytext NOT NULL,
-
- `ipaccess` varchar(15) NOT NULL default '*',
-
- `status` enum('0','1') NOT NULL default '0',
-
- `create_date` datetime NOT NULL default '0000-00-00 00:00:00',
-
- `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
- # 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