分类: LINUX
2015-08-19 00:38:05
cd /usr/local/src
wget style="line-height:1.5;">
tar -zxvf pure-ftpd-1.0.42.tar.gz
cd pure-ftpd-1.0.42
./configure --with-diraliases --with-language=simplified-chinese --with-puredb --with-virtualchroot --with-rfc2640
make check
make install
cd /usr/local/sbin
cp
/usr/local/src/pure-ftpd-1.0.42/configuration-file/pure-config.pl .
chmod 755 pure-config.pl
cp
/usr/local/src/pure-ftpd-1.0.42/configuration-file/pure-ftpd.conf /etc
chmod 755 /etc/init.d/pureftpd
chkconfig --add pureftpd
chkconfig pureftpd on
ChrootEveryone yes //注释后,配合pure-pw
useradd -D 使用能访问整个目录
DisplayDotFiles no //不显示隐藏文件
NoAnonymous yes
//不允许匿名用户
PureDB /etc/pureftpd.pdb //虚拟用户数据库
PassivePortRange 45000
46000 //主动连接的端口范围
Bind 192.168.5.36,21
Umask 517:007 //自己上传和删改,同组读写 -w-rw----, 缺省133:022
IPV4Only yes //只使用IPV4协议
FileSystemCharset UTF-8
ClientCharset gbk
useradd tomcat -g ftpgroup //tomcat系统用户
groupadd ftpgroup //新建系统组
useradd -g ftpgroup -d /dev/null -s
/sbin/nologin ftpuser //新建用户加入ftpgroup中
./pure-pw useradd oa -u ftpuser -d
/da/data/office //-u 附体系统用户
./pure-pw useradd da -u ftpuser -d
/da/data/impexp
./pure-pw useradd sys -u tomcat -D /da //不限制chroot,需配合ChrootEveryone
./pure-pw mkdb /etc/pureftpd.pdb
./pure-config.pl /etc/pure-ftpd.conf //启动
chown -R tomcat:ftpgroup /da
chown -R ftpuser:ftpgroup /da/data/impexp /da/data/office
--pure-pw show oa //显信息
--pure-pw passwd oa [-m] //更改oa的密码(在/etc/pureftpd.passwd ) 并且同时将这个改变提交到 /etc/pureftpd.pdb中。
--pure-pw userdel oa //删用户
chmode 755 pure-ftpd.conf
cp
/usr/local/src/pure-ftpd-1.0.42/contrib/redhat.init /etc/init.d/pureftpd
-------------------------------------------------------------------------
/etc/pure-ftpd.conf
FTP USERS: