Monday, February 11, 2008

FTP error 500 OOPS: cannot change directory

After the installation of vsftpd on my centos5.1, I've tried to ftp but it return the following error messages:

Silver-Surfer:~ DragonX$ ftp 192.168.21.129
Connected to 192.168.21.129.
220 (vsFTPd 2.0.5)
Name (192.168.21.129:DragonX): mdalghazali
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/home/mdalghazali
ftp: Login failed.

The reason? SELinux is in the way.... If the SELinux can understand English, I was saying something like this to it: "I know FTP isn't a secure SELinux, but I promise I'll stay behind the hardware firewall". Unfortunately the SELinux doesn't understand english (^^). So I've to used the Linux language to speak to it:

sudo /usr/bin/setsebool -P ftp_home_dir 1

That's it, now log in...

Ref : http://www.mailbeyond.com/ftp-error-500-oops-cannot-change-directory

2 comments:

shooflypie said...

Hmm ive got this problem on a website on ukllinux hosting which runs CentOS, any idea if its possible to fix from the ftp side of things?
Most likely not I guess :)
http://www.groovyweb.ukinux.net

Tanpa Nama said...

Might as well you try to telnet the ftp port 1st,and see whether its available or not. Alternatively just use the SCP (^^)