Home Store Blog

USB drive formatted in NTFS

#1

I have a usb thumb drive formatted as NTFS. When I open it in places, all the permissions are set to 777. Can’t change any file permission e.g. remove execute. Same behavior on 18.10 and 19.04. Any way to remove execute so one can click on say a .txt file had have gedit open it automatically?

And yes, if I format it as FAT32 everything work correctly.

#2

I havent tested this but does this still work?

#3

Short answer is no. Since this is a flash drive there is no fstab entry. No big thing really, reformatting as fat32 works.

#4

It’s just how NTFS works under Linux…

This Windows file system knows nothing about permissions, it’s mounted by your system with kind of emulated permissions for you to be able to deal with the files in it.

Only thing you can do is set permissions on the mount-point folder ( which is a folder inside your linux system ) but not straight on the files « inside » the NTFS system.

#5

Well, FAT32 permissions are correct.

#6

It depends on the driver who « emulates » the non-linux system files ( gvfs ).

Fat32 also knows nothing about permissions, it’s just the mount-point which has different permissions. The files themselves on the fat32 file system are not impacted.

Auto-mounts of removable medias are managed through udiskctl and I assume udev rules, there probably are ways to change automatic permissions on the mount-point folder for a NTFS media but right now I don’t know them.

#7

Thanks, that makes sense.