I am currently using debian 6 squeeze. I would like to change the owner of a floder in my usb key.
So I did :
chown -R www-data /media/USB/myfolder/myfile
I got this message :
chown: changing ownership of `/media/USB/myfolder/myfile': Operation not permitted
I googled it, indeed my partition is a vfat and then I did :
vim /etc/fstab
Then I add at the end of the file (44 is the uid of www-data):
default,utf8,umask=077,uid=44,gid=44
I rebooted and I got the same error as in the beggining
chown: changing ownership of /media/USB/myfolder/myfile': Operation not permitted
Then I replaced the line in /etc/fstab by
default,utf8,umask=077,uid=0,gid=0
I got the same problem after rebooting
Can anyone help me, Thank you
With default,utf8,umask=077,uid=44,gid=44
this in your FSTAB, the files should be owned by www-data. The ownership of files on mounted FAT partition is set by the mount command, and can't be changed after that; the partition itself can't record any changes to ownership.