CentOS 5.4 vsftpd简单配置
CentOS 5.3 Vsftpd配置
1、装完系统后,安装防火墙时选择了Selinux Active;
2、启动后运行:
# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
此时服务已经启动。
3、新增加系统用户:
#useradd -d /home/www.banyue.net -s /sbin/nologin banyue.net //增加新用户不让在本机登陆
#chown –R banyue.net /home/www.banyue.net //更改新增目录的权限,只允许usertest访问此目录;
#chmod 777 /home/www.banyue.net
# passwd usertest //为用户设置密码;
Changing password for user usertest.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4、在windows机器上登陆ftp
c:\>ftp www.banyue.net
VsFTP出现500 OOPS: cannot change directory
5、在linux Shell 命令模式下
#setsebool ftpd_disable_trans 1 // 关闭掉Selinux 对ftp服务的保护;
#vi /etc/selinux/config
SELINUX=disabled //将此处设置为Disable
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
重启服务
# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
再试成功!
本文由伴月煮石整理! 转载请注明出处!
十二月 15th, 2009 at 00:44
这个是很方便的配置。。