System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

550 Failed to change directory.

 
SOLVED
Go to solution
Yaboto
Super Advisor

550 Failed to change directory.

Hi,

After installing and configuring vsftpd package, I could login with FTP but I can't change to some directories especially the newly created ones.


230 Login successful.
ftp>
ftp>
ftp> bin
200 Switching to Binary mode.
ftp> ls /works
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
/works
226 Directory send OK.
ftp: 8 bytes received in 0.00Seconds 8000.00Kbytes/sec.
ftp>
ftp> cd /works
550 Failed to change directory.
ftp>

Please Advice


Regards,
8 REPLIES
J. Maestre
Honored Contributor

Re: 550 Failed to change directory.

Check the directory permisions.

Also, are you using SELinux?
Yaboto
Super Advisor

Re: 550 Failed to change directory.


I am using RHEL5, please
Ivan Ferreira
Honored Contributor
Solution

Re: 550 Failed to change directory.

Check if SELinux is enabled:

sestatus

Disable SELinux using

setenforce 0

Restart the vsftpd daemon

service vsftpd restart

Disable SELinux by editing /etc/sysconfig/selinux
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
J. Maestre
Honored Contributor

Re: 550 Failed to change directory.

You can also just disable it for vsftpd:

setsebool ftpd_disable_trans 1
service vsftpd restart
Yaboto
Super Advisor

Re: 550 Failed to change directory.


Please, I am used to HP-UX, not Linux. Forgive me if my question is too basic:

What is SELinux ?

What does it do ?
Steven E. Protter
Exalted Contributor

Re: 550 Failed to change directory.

Shalom,

By default vsftpd chroot's the user.

That means the user does not have access to /

You are in a subdirectory when you start.

Or:

The user does not have permissions.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
J. Maestre
Honored Contributor

Re: 550 Failed to change directory.

SELinux is an implementation of mandatory access control on Linux.

When it comes to files, it extends file permissions beyond the classic -rwxrwxrwx set, controlling which processes can access which files and how.

If it's being enforced on vsftpd it could be the culprit of your problem, and you would have to either configure the SELinux policies or disable it for the vsftpd daemon.

As suggested above check if SELinux is enabled, and if it is and you don't need it, disable it either just for vsftpd or all of it.
Yaboto
Super Advisor

Re: 550 Failed to change directory.


Thanks !!!