I managed to configure my Raspberry Pi as an FTP server with ProFTPD. The only problem is, I can´t upload and rename files and Windows Explorer says:

350 File or directory exists,ready for destination name
550 Rename xyz permission denied

Now I´ve read I have to chown this folder to the FTP user, but this does not work.

I have tried:

sudo chown -R pi /var/www (my default pi account)
sudo chown -R piftp /var/www (the ftp account)

sudo su
chown -R root /var/www

All I´m getting is

chown:changing ownership of ... : Operation not permitted

I already chmodded this directory to 777.

/var/www is mounted from a vfat volume on my external hard disc. Looking at it with ls -l I see all files and folders have owner root and group root and all of these folders have permissions drwxr-xr-x.

Can someone please help?

  • 2
    What is the current owner of the folder? – Ramhound Mar 22 '14 at 15:10
  • The owner of www is pi – Marian Klühspies Mar 22 '14 at 15:26
  • Are you able to sudo other commands that normally require it. Its almost like the root doesn't even exist. – Ramhound Mar 22 '14 at 19:10
  • yes I am, I was also able to change the root password – Marian Klühspies Mar 23 '14 at 2:29
  • What does ls -l give for the failing file or folder? And your "All I'm getting is chown:changing ownership of ... : Operation not permitted" applies to all files and folders, right? Or do some succeed? If some do succeed, is the file or folder that is failing any special? Like maybe that is a file that has been uploaded by Windows Explorer with some temporary name? – Arjan Mar 23 '14 at 7:59

I don't think VFAT supports the type of permissions you're trying to set. In such case, the permissions are set the same for all files, when mounting the disk. Something like:

sudo mount -t vfat -o uid=piftp,gid=piftp /dev/sda1 /var/www

See also Can't change permission/ownership/group of external hard drive on Ubuntu here on Super User, or the external resource Connect your Raspberry Pi to a USB hard disk.

  • no effect at all, tried everything of those examples – Marian Klühspies Mar 23 '14 at 11:15
  • Surely the output of ls -l must be different when you mount the drive like above, @Nachbar90? – Arjan Mar 23 '14 at 11:42
  • the output for the mounted hdd is drwxr-xr-x 15 piftp piftp – Marian Klühspies Mar 23 '14 at 11:46
  • Sounds like me that your "chown: changing ownership not permitted" has been answered then? – Arjan Mar 23 '14 at 11:59
  • yes but not my real problem. The hdd is mounted as read only I think. The command for mounting it as rw is just giving me the mount infotable – Marian Klühspies Mar 23 '14 at 12:02

OP wrote:

I solved my ftp problem by mounting with umask 0000

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.