If I try to set this option for a file on an external drive it just unmarks itself. Doing
chmod +x has no effect. The drive is mounted with default options.
Your external disk is likely formatted NTFS or FAT32. Those filesystems do no support Linux file permissions.
You've now at least five options:
- Just copy it to the desktop (or your Home folder) and set the permissions on that file.
- Backup the data on it and reformat the drive to the
ext4filesystem. This can be done using the Disk Utility or GParted
- Execute the file with a program, open a terminal and run:
- for Bash scripts:
- for Python scripts:
- for Perl scripts:
- for windows executables:
- for 32-bit binaries:
- for 64-bit binaries:
- for Bash scripts:
- Copy the file to your computer (e.g. home folder), set the execute bit on it and run it. (this cannot be done for all files)
(possibly dangerous) Mount the partition with the execute bit set for all files. To do so, follow these instructions:
- Mount the partition (by opening it in a file browser for example)
Open a terminal and run:
sudo mount -o remount,fmask=027 /media/YOURDRIVE
If you cannot write / access files, run the command with
sudo mount -o remount,fmask=027,id=$(id -u) /media/YOURDRIVE
"Possibly dangerous" because you grant execute permissions to all files, only use this option if the other methods do not work.
If the filesystem is formatted as FAT or NTFS, you could always mount it with appropriate permissions. The default permissions when you mount from command line include execution permissions for all users.
To obtain more specific results, see the manual pages of
mount, the latter in the section Mount options for fat, in particular take a look at options
Ubuntu 10.04 had no problem setting permissions to run programs or read/write on external drives.
It's an enduring trait for me that makes it the best version to ever run on a USB.
Whatever was taken away to stop this - and it's poor default wireless connectivity - is what makes 10.10 and beyond such a mess of frustration.
Fixing stuff like this should not be the job of the user. If mobile execution is a must, use 10.04.