pureftpd-mysql无法启动

时间:2015-05-26 17:51:38

标签: mysql ftp debian pureftpd

我按照this教程安装pureftpd-mysql,但我无法使用示例用户或任何其他用户登录。

这里是netstat -tnlp

的输出
[05:48 PM]-[vagrant@local]-[~]
$ sudo netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.56.101:28521    0.0.0.0:*               LISTEN      26211/pure-ftpd (ID
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      2808/mysqld
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      2252/redis-server 1
tcp        0      0 192.168.56.101:34286    0.0.0.0:*               LISTEN      26133/pure-ftpd (ID
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1641/rpcbind
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      15396/pure-ftpd (SE
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      5448/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      3522/exim4
tcp        0      0 0.0.0.0:46239           0.0.0.0:*               LISTEN      1672/rpc.statd
tcp6       0      0 :::34221                :::*                    LISTEN      1672/rpc.statd
tcp6       0      0 :::111                  :::*                    LISTEN      1641/rpcbind
tcp6       0      0 :::21                   :::*                    LISTEN      15396/pure-ftpd (SE
tcp6       0      0 :::22                   :::*                    LISTEN      5448/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      3522/exim4

这是我的/etc/pure-ftpd/db/mysql.conf

$ cat /etc/pure-ftpd/db/mysql.conf
# MYSQLServer     127.0.0.1
# MYSQLPort       3306

MYSQLSocket      /var/run/mysqld/mysqld.sock

MYSQLUser       root
MYSQLPassword   123
MYSQLDatabase   pureftpd

# You can also use "any", "cleartext", "crypt", "sha1", "md5" or "password"
MYSQLCrypt      sha1

MYSQLGetPW      SELECT Password FROM users WHERE User='\L'

MYSQLGetUID     SELECT Uid FROM users WHERE User='\L'
#MYSQLDefaultUID 1000

MYSQLGetGID     SELECT Gid FROM users WHERE User='\L'
#MYSQLDefaultGID 1000

MYSQLGetDir     SELECT Dir FROM users WHERE User='\L'
MySQLGetQTAFS  SELECT QuotaFiles FROM users WHERE User='\L'
MySQLGetQTASZ  SELECT QuotaSize FROM users WHERE User='\L'

# MySQLGetRatioUL SELECT ULRatio FROM users WHERE User='\L'
# MySQLGetRatioDL SELECT DLRatio FROM users WHERE User='\L'

MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User='\L'
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User='\L'

重新启动服务器后,状态不会返回正常结果。

server status fail

ls -la /home我明白了:

[05:45 PM]-[vagrant@local]-[~]
$ ls -la /home
total 16
drwxr-xr-x  4 root    root    4096 May 26 17:36 ./
drwxr-xr-x 26 root    root    4096 May 21 17:13 ../
dr-xr-xr-x  3 ftp     ftp     4096 May 26 17:36 ftp/
drwxr-xr-x  7 vagrant vagrant 4096 May 26 17:15 vagrant/

我的用户表SELECT * FROM users;

mysql> mysql> SELECT * FROM users;
+---------+--------+------------------------------------------+------+------+------------+-------------+-------------+---------+----------+-----------+------------+
| User    | status | Password                                 | Uid  | Gid  | Dir        | ULBandwidth | DLBandwidth | comment | ipaccess | QuotaSize | QuotaFiles |
+---------+--------+------------------------------------------+------+------+------------+-------------+-------------+---------+----------+-----------+------------+
| example | 1      | 88ea39439e74fa27c09a4fc0bc8ebe6d00978392 | 2000 | 2000 | /home/test |         100 |         100 |         | *        |        20 |          0 |
+---------+--------+------------------------------------------+------+------+------------+-------------+-------------+---------+----------+-----------+------------+
1 row in set (0.00 sec)

sudo mc /var/log syslog

0 个答案:

没有答案