Friday, February 10, 2012

FTP Error - 500 OOPS: cannot change directory:/home/user


If you have the ftp error below with SELinux enabled, you can disable SELinux to resolve the issue.

[root@localhost ~]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (localhost:user): user
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/user
Login failed.
ftp> quit

Or you can use setsebool

su -
getsebool -a | grep ftp
setsebool -P ftp_home_dir on
getsebool -a | grep ftp