I'm trying to run a script as another user that starts a piece of software (Etherpad), which is run like so (from root):
su -c "/var/www/etherpad-lite/bin/run.sh" -s /bin/bash etherpad but I'm getting the following error:
bash: /var/www/etherpad-lite/bin/run.sh: Permission denied
This had previously worked perfectly, and only stopped working after I installed a bunch of things for another project I'm working on, none of which should have affected etherpad.
/var/log/auth.log shows this:
Aug 12 19:59:21 bhs1 su: Successful su for etherpad by root Aug 12 19:59:21 bhs1 su: + /dev/pts/1 root:etherpad Aug 12 19:59:21 bhs1 su: pam_unix(su:session): session opened for user etherpad by root(uid=0) Aug 12 19:59:21 bhs1 su: pam_unix(su:session): session closed for user etherpad
I've done some searching and I found a couple of things that could cause this, but none are relevant to my problem:
- The file is chmodded to 777 (
-rwxrwxrwx) and it's owned by the etherpad user. I only changed it to 777 to make sure it wasn't a permissions issue, it was something like 700 before.
- The file system doesn't have noexec enabled
I'm running Debian 7.6 on a dedicated server.