cemlo
cemlo

Reputation: 135

shell script not executing despite full permissions

I have a small script that executes fine from my home folder but when moved to a different folder on different partition (EXT4)

 $ ls -lah ./build.sh

-rwxrwxr-x 1 olmec(me) olmec(me) 510 Oct 31 20:00 ./build.sh

$ ./build.sh

bash: ./build.sh: Permission denied

I have tried chmod 777 build.sh but no difference. The script is in folder /media/data/source

Data drive partition is mounted in FStab as UUID=affd0ac6-f3da-4f88-ac22-65d94dc5da8c /media/data ext4 user,user 0 0

Resolved by modifying FStab mount command UUID=affd0ac6-f3da-4f88-ac22-65d94dc5da8c media/data ext4 auto,users,exec 0 0

Upvotes: 1

Views: 221

Answers (1)

Zsolt Botykai
Zsolt Botykai

Reputation: 51643

Most probably it's on a volume which was mounted with the noexec option, I'd check that. If that's not the case, you can still try to find out from strace bash yourscript's output.

Upvotes: 2

Related Questions