I am unable to run scripts that I previously had been doing:
$ SCRIPT.SH
bash: /media/USER/PATH/bin/SCRIPT.SH: Permission denied
Checking the file permissions and ownership, that are as expected:
$ ll PATH/bin
total 1
-rwxr--r-- 1 USER USER 1425 Aug 5 09:23 SCRIPT.SH
I have also tried running the scripts with sudo
, and even given a test script full permissions:
chmod u=rwx,g=rwx,o=rwx SCRIPT.SH
Everything leads to the same bash: Permission denied
message
Background:
The scripts are located on a USB HDD, as they were when they could be run.
What has changed is: the drive label,
The updated .bashrc
PATH entry for the 'new location'
PATH="/media/USER/MOUNTDIRECTORY/bin:$PATH"
And so the volume was mounted at the same 'named' place, an fstab entry
UUID=UUID /media/USER/MOUNTDIRECTORY ext4 defaults,user,auto 0 1
I'm clearly missing something!
user
as it impliesnoexec
which will prevent binary executable e.g./bin/bash
from running on that virtual filesystem mount ... Then, mount it again and it should work.. – Raffa Aug 05 '23 at 12:17exec
option afteruser
likedefaults,user,exec,auto
– Raffa Aug 05 '23 at 12:23