标签:
yum -y install pam-devel cd /usr/local tar zxf pure-ftpd-1.0.36.tar.gz cd pure-ftpd-1.0.36 ./configure --prefix=/usr/local/pure-ftpd/ --with-puredb make && make check && make install
mkdir -p /usr/local/pure-ftpd/etc/ touch /usr/local/pure-ftpd/etc/pureftpd.passwd /usr/local/pure-ftpd/bin/pure-pw mkdb /usr/local/pure-ftpd/etc/pureftpd.pdb cd /usr/local/pure-ftpd-1.0.36/configuration-file cp /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.conf /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.conf.backup vim /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.conf 配置文件里pure-ftpd.conf 指定pdb位置 PureDB /usr/local/pure-ftpd/etc/pureftpd.pdb 修改端口 PassivePortRange 30000 30500 chmod 777 /usr/local/pure-ftpd-1.0.36/configuration-file/pure-config.pl /usr/local/pure-ftpd-1.0.36/configuration-file/pure-config.pl /usr/local/pure-ftpd-1.0.36/configuration-file/pure-ftpd.conf groupadd ftp_user useradd wfc_ftp gpasswd -a wfc_ftp ftp_user 使用 id wfc_ftp 查看组信息 大概会输出以下内容 uid=502(wfc_ftp) gid=503(wfc_ftp) 组=503(wfc_ftp),502(ftp_user) # 创建用户ftp根目录 mkdir -p /data/ftp_data/wfc chown wfc_ftp:ftp_user /data/ftp_data/wfc # 添加用户 # 语法 /usr/local/pure-ftpd/bin/pure-pw useradd $user -u $uid -g $gid -d $dir -m /usr/local/pure-ftpd/bin/pure-pw useradd wfc_ftp -u 502 -g 503 -d /data/ftp_data/wfc -m # 添加防火墙规则 vim /etc/sysconfig/iptables # 在适当位置添加 -A INPUT -p tcp --dport 21 -j ACCEPT -A INPUT -p tcp --dport 30000:30500 -j ACCEPT service iptables restart # pure-ftpd 命令帮助 # 查看已有用户 /usr/local/pure-ftpd/bin/pure-pw list # 删除用户 /usr/local/pure-ftpd/bin/pure-pw userdel $user -m # 修改密码 /usr/local/pure-ftpd/bin/pure-pw passwd $user -m
标签:
原文地址:http://www.cnblogs.com/funsion/p/4455056.html