0

I have a hard drive mounted as /data. I'm the owner of the mountpoint, and I own all the directories under it. I installed an IDE under /data. It contains a shell script you need to execute to setup the IDE. This file is also owned by me, and is user, group, world executable. (i.e. I don't need chmod +x ...). For some reason, it wont let me execute the script. I continually get permission denied errors. As soon as I move the file to my home directory, with no permissions changes, it lets me execute the script. Is there a setting somewhere that is preventing me from executing files outside of my home directory, even if I own them and they are set as executable?

In case it matters, I'm running 16.04.

  • How is the drive mounted? what are its mount options (check by running the mount command with no arguments) – steeldriver May 1 '17 at 1:48
  • also, please edit your question with the output of ls -lsa /data/your-shell-script – Yaron May 1 '17 at 6:29
0

baAmong the options you can pass to mount or write in fstab there is an exec flag. Remounting your drive with that option should help.

(If this is a bash script, you can probably also do /bin/bash /data/nameOfScript, but you'll run into the next problems soon, I guess.)

  • thanks. Thats what it was. I didn't realize the default was noexec, I thought you had to specify that explicitly and that the default was exec – Bryant May 2 '17 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.