2

On linux, the base permissions for directories is 777 and for files, it is 666. Thus, with umask=022, new files are 644 and new directories are 755.

But when I mount a usb drive with fat32 filesystem, the base permissions is 777 for both directories and files.

I have the following line in my fstab file :

/dev/sdb1   /media/usbdrive  vfat   user,noauto,noatime,flush,fmask=113,dmask=002   0   0

So, new files are 664 and new directories are 775.

Is it normal for a usb drive with fat32 to have 777 as the base permissions for files and directories?

  • 5
    Keep in mind that FAT32 does not support POSIX permissions, so whatever you see is set by the system on the fly. – Bobby Jun 18 '13 at 21:37
1

FAT32 does not have the same space allocated on disc per file for the ownership information and permissions bits.

So roughly you could say that file meta information is truncated on storage and then extended on retrieval in the most permissive way (as there is no way to tell some other user created the file). If the system would not do that, you would be able to read the files you yourself just wrote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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