Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 10.10 does not allow double-click execution of files such as binaries or Python scripts if they are on a flash drive, even when the file is marked as executable.

I believe it is probably a security measure new to 10.10; 9.10 allows double-click execution.

How can I revert this behavior?

share|improve this question
1  
Is it not because the drive is FAT/VFAT/NTFS and therefore doesn't have an execute bit? –  Oli Oct 20 '10 at 22:48
    
I don't see this issue myself? –  JanC Oct 21 '10 at 2:38
add comment

1 Answer 1

up vote 4 down vote accepted

Prior to Ubuntu 10.10, all files on drives formatted with the vfat file system (e.g. most flash drives) were mounted with the executable bit. This led to a couple of problems, in particular you were asked for all text files whether you want to open or execute them (Bug #14335). It was therefore decided to mark all files as not executable, but use the mount/fstab option "showexec" (which is documented in the mount man page), that's why .exe, .bat and .com are still marked as executable: https://blueprints.launchpad.net/ubuntu/+spec/vfat-noexec

By the way: This change was sent upstream, so all other distributions using udisk should now show the same behaviour.

You may set the mount behavior on a per-drive (using the drive's UUID) or per-mount-label basis by adding entries in your filesystem table (/etc/fstab; see man mount and man fstab for more information.) Note that this will cause duplicate entries for every affected drive in Nautilus (and perhaps other file managers as well).

Alternatively, if you are only using your flash drive with Linux machines, you can reformat it as ext3, etx4 or similar, where the normal UNIX rights and the executable bit apply.

share|improve this answer
add comment

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.