一、用ports方式安装
# cd /usr/ports/ftp/pure-ftpd/
默认ports安装pure-ftpd时不支持puredb
# ee Makefile
在CONFIGURE_ARGS中 加入 --with-puredb
# make WITH_LANG=simplified-chinese install clean
ee /etc/rc.conf 加入:pureftpd_enable="YES"
二、修改配置文件。
# cd /usr/local/etc/
# cp pure-ftpd.conf.sample pure-ftpd.conf
# ee pure-ftpd.conf
找到# PureDB /etc/pureftpd.pdb
把#去掉,路径改成你刚才建的/usr/local/etc/pureftpd.pdb
好了。就这么简单。就和系统帐号完全分离了。
三、加入系统用户
pw useradd ftp -g nobody -s /sbin/nologin -d /home/ftp/incoming //是系统的FTP帐号
-d后面目录不能空,这个帐号(只能这个名字)用于记录日志,
也可在/usr/local/etc/pure-ftpd.conf中修改SyslogFacility none
从而不允许ftp帐号登陆。
四、加入虚拟用户
1)# /usr/local/bin/pure-pw useradd youID -u nobody -g nobody -d /home
两次输入密码
2)更新数据库:
# /usr/local/bin/pure-pw mkdb /usr/local/etc/pureftpd.pdb
五、PURE_PW用法
# pure-pw useradd xcityr -f /usr/local/pureftp/etc/ftppasswd -u nobody -g nobody -d /data/web/xcity -m
---注:xcity :ftp用户
-f ftppasswd:存放用户密码信息的文件
-u 用户uid 一般是系统的一个用户,就是你的ftp用户的家目录的用户
-g 用户组id
-d 锁定用户在家目录
-m 使pureftpd.passwd写进pureftpd.pdb,使更改生效。
*修改用户: # pure-pw usermod --help
*删除用户: # pure-pw userdel <login> [-f <passwd file>] [-m]
*更改拥护密码:# pure-pw passwd <login> [-f <passwd file>] [-m]
*查看用户详细内容: # pure-pw show <login> [-f <passwd file>]
*生成db文件,使密码生效: # pure-pw mkdb [<puredb database file> [-f <passwd file>]]
*列出所有用户: # pure-pw list [-f <passwd file>]
出错了看:
Pure-ftpd: account disabled
I have configured pure-ftpd using FreeBSD ports(usually compiled from source). After everything have setup, postgresql, db, table, users and etc, it seem like cannot connect into the server with the below message…
Dec 19 16:34:14 server pure-ftpd: (?@202.181.206.234) [WARNING] Can’t login as [test]: account disabled
After few hours of checking, I found the cause of the problem is the UID and GID I set was low than 1000, if you have the similar problem, try to set a higer UID and GID. Better in the range of 5000(my own opinion).
All the best
分享到:
相关推荐
glibc-port及s-2.12.1.tar.gz此资源用于升级glibc版本到glibc-2.12.1的附属文件
网上搜索了相关的文章,有的不是全对,下面的内容是本人结合两篇文章做实验后成功的,为方便以后查询,公开此教程。希望对大家有帮助,如有不对之处,还请谅解
列取系统程序进程和使用端口及协议[ListProcesses&Ports.rar]-精品源代码
51单片机串行口通信及智能小车红外寻迹测试程序 串口工作方式1 实现最基本的串口发送过程测试 寻迹包含PWM波的调节
里面包含glibc-ports-2.14.tar.gz以及glibc-ports-2.15.tar.gz
需要make编译和make install安装
Window 7版Acrive Ports : Guard Ports - MFC 2012,v1.0.0.2, 北京师范大学 AlexZhang 开发版本,此版本能够兼容XP、2000、win7、win8、win10系统,能够很容易地判断出某个端口被什么程序给占用了。能够发现windows...
微处理器包括arm等的linux的接口文件源码!
glibc-ports-2.11.tar.bz2 重合名加后缀.patch
uCosII 移植代码
glibc-ports-2.9.tar.bz2 crosstool-ng编译需要的工具
uCosII 移植
uCosII 移植
笔记本+win7下USB2.0转串口驱动的安装
gnu安装包
tar -xvf glibc-ports-2.14.tar.gz mv glibc-ports-2.14 glibc-2.14/ports mkdir glibc-2.14/build cd glibc-2.14/build ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/...
linux lib.so版本升级必须安装包,尤其在安装高版本工具时必须,资源比较少,亲测可用
如何在所有Android上安装GCam APK? 1.)下载适用于您的Android的支持的GCam APK下载。 2.)确保您的智能手机Camera 2 API已启用。 3.)完成后,安装apk文件。 4.)启用“未知来源”选项。 5.)最后,安装apk。 6.)...
Virtex-7 FPGA资料
PROLIFIC_Ports_1.0_None_71481 串口驱动