Can not run .exe .com and .bat from NTFS formated USB flash drive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ntfs-3g |
New
|
Undecided
|
Unassigned | ||
udisks |
Confirmed
|
Wishlist
|
|||
udisks2 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
1. Description of the problem:
Currently NTFS formated USB flash drives do not have the exec bit for {exe,com,bat}. Use of NTFS makes more sense for some users , as pen drives tend to have larger capacities than earlier .
"vfat" support 'showexec' mount option, which is currently not implemented on ntfs-3g.
The use case is necessary when we have applications that are multi platform.
2. How reproducible is the problem?
Always. Format a usb key with NTFS and copy some .exe files. Insert it to the usb port and let Nautilus open it.
Files won't have the +x bit enabled.
drwxr-x---+ 4 root root 4096 Mar 11 16:11 ..
-rw------- 1 user1 user1 29 Mar 8 14:20 aaa.exe
3. Workaround
You can umout and mount manually with the following command. But it defeats the purpose of having proper permissions from the start.
sudo mount -t auto /dev/sda1 /media/lborda/
4. Additional info:
* ntfs-3g allows for exec mount option, which enables execute bit for all files.
* We would also need to enable "showexec" bit in udisk for ntfs, or allow for https:/
description: | updated |
tags: | added: saucy |
Changed in udisks: | |
importance: | Unknown → Wishlist |
status: | Unknown → Confirmed |
Created attachment 42455
Proposed patch (against current git)
gnome-mount had a feature to specify mount options per file system types (via GConf key "/system/ storage/ default_ options/ <fs type>/mount_ options" ) that could be used to restrict read-only mount of removable devices from the desktop.
I could not find something similar with udisks (maybe it's there but I could not find it) so I wrote the attached patch to add this feature.
Basically, udev sets a property UDISKS_ MOUNT_OPTIONS (coma separated list of options to pass to mount) that is read by udisk-daemon and appended to the options used to mount the device.
The idea is to allow sysadmins to force some mount options on some devices, for example "ro,noxec" on USB sticks.