现象:Pureftpd+Mysql中的status参数设置为0表示账户不启用,1表示正常使用,重新安装了Pureftpd+Mysql后这个参数不起作用了

解决:pureftpd-mysql.conf 中有关于 Pureftpd 调用 Mysql 中各参数的简单例子,修改这里即可,下面是我的文件中的,大家按照自己的数据库列名字修改即可,把默认的注释掉,默认的是没有status以及ipaccess参数的


#ADD
MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetUID SELECT Uid FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetGID SELECT Gid FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MYSQLGetDir SELECT Dir FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE"\R")
MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L" AND status="1" AND (ipaccess ="*" OR ipaccess LIKE "\R")
MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L" AND status="1" AND (ipaccess ="*" OR ipaccess LIKE "\R")
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND status="1" AND (ipaccess ="*" OR ipaccess LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND status="1" AND (ipaccess ="*" OR ipaccess LIKE "\R")

原创文章,转载请注明: 转载自混沌

本文链接地址: Pureftpd+Mysql中的status参数不管用的解决方法