# Users that are not allowed to login via ftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
~
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
games
nobody
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
220 (vsFTPd 2.0.5)
User (192.168.0.30none)): root
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/rootConnection closed by remote host.
Linux服务cannot change directory错误解决方法
在安装完vsftp服务后登陆时可能遇到cannot change directory后面是登陆者的目录的错误。这是因为SE设置的关闭了ftp的原因。
使用命令
getsebool ftpd_disable_trans
可以查看当前的状态如果不是on
那么是输入命令
setsebool ftpd_disable_trans 1
当然也可以加入-P参数 以便不需要每次开机都输入这个命令
setsebool -P ftpd_disable_trans 1
同理 如果smb服务也遇到相同的问题 ,也可以这么做。
setsebool -P samba_enable_home_dirs=1
selinux的问题也可以使用 管理工具中的 selinux management 来调整相关设置。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |