Ubuntu – How to change file permissions on a FAT32 drive?

fat32permissions

I have Ubuntu 10.04 LTS (Lucid Lynx).

I've noticed recently every file on my hard drive gets the executable privilege, even every text files, so when I open it a pop-up window asks me what to do (run in terminal-Display-Cancel-Run).

I tried to change permissions in the terminal as sudo chmod a-x -Rv /media/D/*. It shows me that privileges have been changed to 666 which means rw-rw-rw, but actually nothing has been done; it's still as executable privilege given.

I tried to move some files to the desktop. Then did as above, and it was successful.

My hard drive is formatted as "FAT32". What would be the problem?

Best Answer

FAT32 formatted drives do not support file permissions. The permissions for everything are determined by how the drive is mounted.

So, you can change the permissions on all the files on the drive by mounting it differently, but not dynamically like you are describing.

See https://askubuntu.com/a/96929/6161 on how to remount using different permissions.