I've set up vsftpd
on Amazon EC2 with the Amazon Linux AMI. I created a user and can now successfully connect via ftp. However, if I try to upload something I get the error message
553 Could not create file.
I assume this has to do with permissions, but I don't know enough about it to be able to fix it. So basically, what do I have to do to be able to upload files?
Best Answer
There are two likely reasons that this could happen -- you do not have write and execute permissions on the directories leading to the directory you are trying to upload to, or
vsftpd
is configured not to allow you to upload.In the former case, use
chmod
andchown
as appropriate to make sure that your user has these permissions on every intermediate directory. The write bit allows the affected user to create, rename, or delete files within the directory, and modify the directory's attributes, whilst the read bit allows the affected user to list the files within the directory. Since intermediate directories in the path also affect this, the permissions must be set appropriately leading up to the ultimate destination that you intend to upload to.In the latter case, look at your
vsftpd.conf
.write_enable
must be true to allow writing (and it is false by default). There is good documentation on this configuration file atman 5 vsftpd.conf
.