Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got GNOME 3 on an LMDE machine and I need to change the automount options to mount without the noexec attribute for an NTFS partition. Does anyone know where I could find such configurations and which tool is responsible for the automounting? I don't have gnome-mount or gnome-volume-ontrol installed and I know you could probably use /etc/fstab but that would cause a lot of problems and doesn't seem to be responsible for the automounting.

Any help would be greatly appreciated.

share|improve this question
    
Are you talking about USB drives, NFS shares, samba or what? I assume USB? –  terdon Feb 10 '13 at 17:39
1  
Are you actually seeing noexec in /proc/mounts, or only guessing that it might be set? –  grawity Feb 10 '13 at 17:39
    
@terdon It's USB and other system partitions. –  Auxiliary Feb 10 '13 at 17:42
    
@grawity I was only guessing because I'm not able to add the executable attribute in the partition with CHMOD. I just checked the file you said. It doesn't have noexec but has default_permissions. Could it be because of that? this is the full line: /dev/sda5 /media/NewVolume fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,bl‌​ksize=4096 0 0 –  Auxiliary Feb 10 '13 at 17:45

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
my problem with /etc/fstab is that I can't mount any entry without root and nautilus can't mount it. This is the line I added in fstab:/dev/sda5 /media/NewVolume fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,exec,allow_other,blksize=4096 0 0 –  Auxiliary Feb 10 '13 at 18:06
2  
@Auxiliary: Entries in fstab are mounted automatically on boot, unless you have added a noauto option. That said, the line you added was incorrect (regardless of what /etc/mtab says). For NTFS, add /dev/sda5 /media/NewVolume ntfs defaults 0 0. –  grawity Feb 11 '13 at 15:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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