vsftpd Error 553 – Could not create file

Have you come across a situation when FTP transfers won’t work even when you are correctly logged in to vsFTP server (on a CentOS box)?

Well the situation could be described as:

  • CentOS 5
  • vsFTPd as FTP server
  • FileZilla as FTP client
  • Connected ok to FTP server via the FileZilla client
  • Try to make a file transfer to FTP server but that fails!!

Well first thing is to check for directory permissions that they allow files to be created. If all seems in order, it may be that SELinux is in action and not allowing the transfer.

Try the following command – this will allow user home directories to receive files.

setsebool -P ftp_home_dir 1

You could even temporarily disable SELinux just to find out if this is the cause of FTP failing to transfer files.

How to disable SELinux permanently

In Fedora Core and RedHat Enterprise, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled:

  • This file controls the state of SELinux on the system.
  • SELINUX= can take one of these three values:
    • enforcing – SELinux security policy is enforced.
    • permissive – SELinux prints warnings instead of enforcing.
    • disabled – No SELinux policy is loaded. SELINUX=disabled
    • SELINUXTYPE= can take one of these two values: # targeted – Only targeted network daemons are protected.
    • strict – Full SELinux protection. SELINUXTYPE=targeted

and then reboot the system.

 

 

If you like this post, please consider sharing...

Rating:
57.0
37 votes
1 2 3 4 5

Leave a Reply


About

IT Professional and enthusiast photographer. Connect with me on Google+