ubuntu上搭建vsftpd且通过mysql来管理FTP账号

参考文章:http://wiki.ubuntu.org.cn/Vsftpd%E5%92%8Cmysql%E9%85%8D%E7%BD%AE

请各位先按照这篇文章一步一步操作,我这里是记录一些其间遇到的一些问题,希望对大家有所帮助。

配置说明:http://vbird.dic.ksu.edu.tw/linux_server/0410vsftpd/0410vsftpd-centos4.php#before

问题总结:

1、登录时出现 “libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work”

    安装的是64位ubuntu系统,会出现这个问题,32位的没有问题。

    请下载这个版本的vsftpd   已共享到百度网盘 http://pan.baidu.com/s/1dE3XLNr

    参见:http://askubuntu.com/questions/126625/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work

    网盘里的vsftpd就是在这里下载的

2、出现“500 OOPS: vsftpd: refusing to run with writable root inside chroot()”,请添加配置:

    allow_writeable_chroot=YES

3、上传或其它操作时,出现550 Permission denied,请添加配置:

    virtual_use_local_privs=YES

4、如果还有其它权限的问题,那就是FTP目录的权限问题

5、user_config_dir可以为每个账户单独配置,文件名与FTP账户名相同

    user_config_dir=/etc/vsftpd/user_conf

    例:有一个test账户,则sudo vim /etc/vsftpd/user_conf/test    在这个文件单独对test账户配置,比如local_root

6、pam_mysql安装(在centos7亲测): 

     如果出现:PAM unable to dlopen, 用下面的包安装

     http://repo.iotti.biz/CentOS/7/x86_64/pam_mysql-0.8.1-0.22.el7.lux.x86_64.rpm

     参考:https://www.cnblogs.com/zhenhui/p/5916116.html

    最后请注意,配置的"="等号两边是不允许有空格的  『参数=设定值』

原文地址:https://www.cnblogs.com/lazyno/p/5373716.html