Recently, I installed Ubuntu 17.04 on a new ssd (standard installation with ext4), no other drive was connected at that time. After I connected my data hdd (ntfs formatted, it's a dual-boot setup with win7), I noticed that every single file on it got the execute flag (had a dual-boot with 14.04 before, but did not have this problem).
If I toggle the flag off on a single file, it is immediately reset. Also, every file that I copy to the hdd gets the flag and if I create a link to a hdd folder on my ssd, the link itself gets the flag after a renoot, making it unusable until I remove the flag (it is reset on the next reboot).
The entry for the ntfs drive in /proc/mounts :
dev/sdc1 /media/brad/mydata fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
- Why did this happen (I did not do anything that should have caused this/how to prevent it from happening next time)?
- How do I safely undo it for the whole drive at once without touching/changing each file (also without changing file date stamps)?
Re:duplicate:
I don't see what this would have to do with chmod, I don't want to change file or folder permissions, I need to correct how ubuntu is seeing the whole drive because that has been changed and I think that change was a very bad decision. So now I have to edit fstab to get the pre-16.10 behavior back. There is no mention of this situation or of the 'correct' (old) permissions one has to set in "How do I use 'chmod' on an NTFS (or FAT32) partition?". While renaming this question to "Reverting ntfs permissions to pre-16.10" might make it more unique, somebody with the same problem does most likely not know about the reason and therefore would not find this thread, so I keep it like it is.
Still waiting for the wrong "Duplicate" note to be removed. This is how a duplicate looks: https://superuser.com/questions/512393/why-is-every-file-marked-as-an-executable-on-my-mounted-ntfs-partition
So I checked the hdd with two liveCDs: 16.10 : execute flag set for all files, 14.04.5 : no execute flag. So it seems the files are unchanged, only how the OS is seeing them has changed.
How do I restore the 14.04 behavior? Currently I am thinking about a custom fstab entry, but I don't really need to automount the drive and don't know if it would work.
– Bradzzv Aug 03 '17 at 14:09grep ntfs /proc/mounts /etc/fstab
and [edit] your question to include its output? Thanks. – David Foerster Aug 26 '17 at 07:31chmod
because that is what people typically use for setting permissions. Reading that should tell you that you should you that the correct place for mount options is/etc/fstab
; as for removing execute bit, usefmask=0133,dmask=022
– muru Aug 28 '17 at 01:44fstab
entries for all of my external USB drives, such as the answers for the linked question, but I want to change default behavior of the auto-mounter. (if there is a way to change default options for auto-mounter) The goals for the questions are different. – sio4 Nov 14 '17 at 16:29