Why will an executable file work normally when residing on one drive but not work when placed an another?
Leap 15.3
Desktop computer with 4 SSD hard drives
sda is presently Windows
sdb is the Leap boot drive with swap, root and home
sdc is a data drive with three partitions mounted in my home directory: Videos, Pictures and Spare-0
sdd is a data drive with four partitions mounted in my home directory: Models, Develop, Spare-1 and Spare-2
They are mounted at boot by way of an entry in /etc/fstab
example:
UUID=789d248e-9a13-47a5-b6a9-578b1d7efd0d /home/bart/Videos ext4 nofail,users,data=ordered 0 0
All this is working properly or at least the way I expected it to.
I am trying to write a bash script and am using the Develop directory while getting it up and working. pwd = ~/Develop.
I created a “Hello World!” script, in the Develop directory, named it test and tested it with the command: bash test. It worked.
I then did a chmod +x test and tried to run it using ./test and received this result
bart@ASU-X99:~/Develop> ./test
bash: ./test: Permission denied
So, I did su -, changed to /home/bart/Develop and tried it again as root and got the same error.
After much time spend trying to understand why root didn’t have permissions enough I came to the conclusion that it wasn’t root or my user that didn’t have permissions, it was/is bash. Can this be right?
I found that if the file test was placed in any directory on sdb (of course not EUFI or swap) it would run.
If the file test was placed in any directory of either sdc or sdd it would not run.
I am having trouble coming up with a reason why this would be considered acceptable behavior. Is it in fact, the way it’s supposed to be? If so, why? Or, is there something wrong with my system? What could it be?
Bart