CentOS 6 VSFTP 553 Could not create file

17,034

Solution 1

That group should have rwx permissions on that folder. If not run

chmod 775 <directory>

Solution 2

You need to run the following commands to allow in SELinux upload and edit files:

setsebool -P allow_ftpd_full_access on
setsebool -P ftp_home_dir on
Share:
17,034

Related videos on Youtube

Mike Keller
Author by

Mike Keller

Updated on September 18, 2022

Comments

  • Mike Keller
    Mike Keller almost 2 years

    I installed vsftpd yesterday on CentOS 6, however didn't get a chance to test it today. When I went to upload a test file it's coming back and giving me this error:

    553 Could not create file

    After some quick googling the information I found on resolving the error, including this post were already things I tried...

    • Confirm user that is connecting to FTP is a part of the group that owns the directory
    • Confirm the vsftpd.conf file has write_enable set to true

    I even went so far as to test changing the group on the whole path down to the destination folder.

    EDIT:

    Just to expand on this, at the time I did ensure that the modes on the directories were set appropriately as well.

    What I ended up doing was uninstalling vsftpd and re-installing from yum. After I did this things worked appropriately. So I'm convinced it was a setting in vsftpd.conf file. However I didn't save a copy of it to do a diff off of to confirm.

    Hopefully someone else who has had the same problem with the same symptoms and found out what the cause was can accurately answer this question here for someone else who comes along.

  • Mike Keller
    Mike Keller over 11 years
    While technically correct, and I should edit the original question to highlight this, this did not resolve the issue at the time either. What I ended up doing was uninstalling vsftpd, and reinstalling through yum again. After that everything worked appropriately. Leading me to believe that the issue was in the conf file somewhere. However I unfortunately didn't save the original vsftpd.conf to do a diff between the two.
  • Atul Vekariya
    Atul Vekariya almost 8 years
    Can you please extend you answer. One line answer with just a command is not counted as helpful
  • BurninLeo
    BurninLeo over 6 years
    Did the trick for me. However, it's tftp_home_dir by now.