apache - vsftpd 提示 500 OOPS: cannot change directory
滿天的星座
滿天的星座 2017-04-25 09:01:12
0
2
856

selinux

selinux 已经disabled

vsftpd

useradd xxx.com -d /var/virtual/xxx.com -g apache

登录vsftpd

提示 500 OOPS: cannot change directory:/var/virtual/xxx.com

网上说的那些都是关闭selinux,可我selinux已经完全关闭的。

[root@localhost vsftpd]# setsebool -P ftp_home_dir 1
setsebool:  SELinux is disabled.
[root@localhost vsftpd]#

整个过程

[root@localhost ~]# ls -la /var/virtual
total 12
drwxrwxr-x  3 root   root   4096 Sep  9 00:50 .
drwxr-xr-x 23 root   root   4096 Sep  8 23:54 ..
drwxrw----  5 apache apache 4096 Sep  9 00:50 xxx.com
[root@localhost ~]# ftp localhost
Trying ::1...
ftp: connect to address ::1Connection refused
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
220 (vsFTPd 3.0.2)
Name (localhost:root): xxx.com
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/var/virtual/xxx.com
Login failed.
ftp> exit
[root@localhost ~]# grep xxx.com /etc/passwd
xxx.com:x:1000:48::/var/virtual/xxx.com:/bin/bash
[root@localhost ~]#

滿天的星座
滿天的星座

reply all(2)
为情所困

What are the permissions of your FTP account on this directory?

曾经蜡笔没有小新

For situations where selinux is turned off and directory permissions are OK, it is recommended to check whether the machine logged in via ftp can ssh to the ftp server normally. vsftp uses ssh as the transmission encryption protocol, which may also be related to this.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template