|
|
折腾了几天了,到网上找了好多资料自己试都没成功,希望大家帮忙,感谢
系统:FC5
软件安装:
- yum install pure-ftpd
- yum install mysql-server
复制代码
pure-ftpd.conf配置:
- ChrootEveryone yes
- BrokenClientsCompatibility yes
- MaxClientsNumber 150
- Daemonize yes
- MaxClientsPerIP 20
- VerboseLog no
- DisplayDotFiles no
- AnonymousOnly no
- NoAnonymous no
- SyslogFacility ftp
- DontResolve yes
- MaxIdleTime 5
- MySQLConfigFile /etc/pure-ftpd/pureftpd-mysql.conf
- LimitRecursion 2000 8
- AnonymousCanCreateDirs no
- MaxLoad 4
- PassivePortRange 40000 50000
- #ForcePassiveIP 192.168.0.1
- AntiWarez yes
- # Bind 127.0.0.1,21
- #AnonymousBandwidth 50
- # UserBandwidth 8
- Umask 133:022
- #MinUID 100
- MinUID 100
- AllowUserFXP yes
- AllowAnonymousFXP yes
- ProhibitDotFilesWrite no
- ProhibitDotFilesRead no
- AutoRename no
- AnonymousCantUpload yes
- #NoChmod yes
- #Quota 1000:10
- MaxDiskUsage 95
- CustomerProof yes
- FileSystemCharset big5
- ClientCharset big5
复制代码
pureftpd-mysql.conf配置:
- MYSQLServer localhost
- MYSQLPort 3306
- MYSQLUser masan
- MYSQLPassword 12345
- MYSQLDatabase FTP
- MYSQLCrypt cleartext
- MYSQLGetPW SELECT Password FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MYSQLGetUID SELECT Uid FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MYSQLGetGID SELECT Gid FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MYSQLGetDir SELECT Dir FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MySQLGetBandwidthUL SELECT ULBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MySQLGetBandwidthDL SELECT DLBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MySQLGetQTASZ SELECT QuotaSize FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
- MySQLGetQTAFS SELECT QuotaFiles FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
复制代码
下面是我的mysql里面的情况:
- mysql> use FTP;
- Database changed
- mysql> show tables;
- +---------------+
- | Tables_in_FTP |
- +---------------+
- | ftpd |
- +---------------+
- 1 row in set (0.00 sec)
- mysql> select * from ftpd;
- +--------+--------+-----------+------+------+--------+-------------+-------------+---------+----------+-----------+------------+
- | User | status | Password | Uid | Gid | Dir | ULBandwidth | DLBandwidth | comment | ipaccess | QuotaSize | QuotaFiles |
- +--------+--------+-----------+------+------+--------+-------------+-------------+---------+----------+-----------+------------+
- | masan | | 123456789 | 500 | 500 | /mnt/e | 1000 | 1000 | ls | * | 0 | 0 |
- | masan1 | 1 | 123456789 | 500 | 500 | /mnt/e | 1000 | 1000 | ls | * | 0 | 0 |
- | tide | 1 | 123456789 | 2000 | 2000 | /mnt/e | 1000 | 1000 | ls | * | 0 | 0 |
- +--------+--------+-----------+------+------+--------+-------------+-------------+---------+----------+-----------+------------+
- 3 rows in set (0.00 sec)
- mysql>
复制代码
所有的配置都在这,我只能匿名登录……
mysql里的都不能登录
并且有一件很奇怪的事情就是我用gftp匿名登录的时候
显示:
- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
- 220-You are user number 1 of 50 allowed.
- 220-Local time is now 09:38. Server port: 21.
- 220-IPv6 connections are also welcome on this server.
- 220 You will be disconnected after 15 minutes of inactivity.
- USER anonymous
- 230 Anonymous user logged in
复制代码
这里面的最大人数和发呆时间的值都是我以前配置的,现在我修改了值也就是上面的150和5,居然还显示以前的,重启重新启动pure-ftpd都是如此
帮忙看看,谢谢 |
|