The auto-mounting is done by GNOME Shell (which watches for new storage devices) and udisks2 (which performs the actual mounting). udisks adds such options as nodev
and nosuid
, and filters user-provided options. However, I could not find any place that would add noexec
by default.
The actual problem is that NTFS filesystems are always mounted with permission support by default – since Windows SIDs cannot be automatically mapped to Unix accounts without manual configuration (creating the UserMapping
file in ntfs-3g).
For an internal partition used in Windows, you can try to automatically generate the mapping using ntfs-3g.usermap
, or create it manually as described in ntfs-3g(8).
john::S-1-5-21-3141592653-589793238-462643383-1008
mary::S-1-5-21-3141592653-589793238-462643383-1009
:smith:S-1-5-21-3141592653-589793238-462643383-513
Another option – best for USB drives – is to create a "mapping" that assigns a fresh SID to all Unix UIDs, without manually translating each user name.
mkdir /media/NewVolume/.NTFS-3G
a=$[RANDOM*RANDOM]; b=$[RANDOM*RANDOM]; c=$[RANDOM*RANDOM]
echo "::S-1-2-5-21-$a-$b-$c-10000" > /media/NewVolume/.NTFS-3G/UserMapping
umount /media/NewVolume
The UserMapping will be enabled on next mount.
Note that if you are talking about partitions of an internal disk, /etc/fstab
would not cause problems – it is in fact the recommended way. Automounting is primarily only for removable disks.
noexec
in /proc/mounts, or only guessing that it might be set?