14

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?

wisdom
  • 283

2 Answers2

14

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.

David Oneill
  • 12,144
  • I dont think so ,because I can set permission in ntfs ans fat32 in ubuntu 10.04 ,but it wont work in 10.10 onwards . – Tachyons Apr 02 '12 at 14:45
  • @tachyons in 10.04, you can change the permissions of a file in a FAT32 drive, unmount the drive, remount the drive, and have the permissions change you did still be there? Are you sure? I just tried changing setting permissions on a fat partition from my 10.04 box - it didn't work. If it does work for you, please provide details on what you did... – David Oneill Apr 02 '12 at 14:47
  • I am sure ,but it works in 10.04 only ,and it wont work with 10.10 11.04 and 11.10 , – Tachyons Apr 02 '12 at 14:51
  • @tachyons please give a detailed list of how you did it - I have a 10.04 box I'd like to try what you're doing on. – David Oneill Apr 02 '12 at 14:52
  • just chose the option for make it executable ,it works same as in the case of home partion , I dont know why it wont work for you , But in later releases of ubuntu i want to copy the file into the home folder – Tachyons Apr 02 '12 at 14:58
  • To make a file executable * – Tachyons Apr 02 '12 at 15:00
  • Hmmm....Thanks alot :), but question please:what do "dmask & fmask " mean ? then need to mount every time as this way !? because when I unmount it and mount as usual in nautilus nothing has been changed ! – wisdom Apr 02 '12 at 19:09
  • 1
    @wisdom dmask is what permissions are applied to directories, and fmask is what permissions are applied to files. As to doing it each time, if there is a certain set of permissions you need, you'll need to edit them into the fstab (I think?) file which contains the default mount settings. If you need more details than this, search for 'default mount permissions' or something along those lines, there are a bunch of related questions – David Oneill Apr 02 '12 at 20:23
0

NTFS and FAT32 hard drives don't support file permissions on Linux. Please follow the guide to enable the function.

I have used this for an NTFS partition, but I never tested it with FAT32.

Reference: forum post Re: How to change permission on entire ntfs partition

Web-E
  • 21,418