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[7289]: Successful su for etherpad by root
Aug 12 19:59:21 bhs1 su[7289]: + /dev/pts/1 root:etherpad
Aug 12 19:59:21 bhs1 su[7289]: pam_unix(su:session): session opened for user etherpad by root(uid=0)
Aug 12 19:59:21 bhs1 su[7289]: 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.
SELinux
enabled? It might as well be a problem./selinux
and/etc/selinux
exist) but, following a guide to disable it (thegeekstuff.com/2009/06/…), none of the specified config files exist on my serversu etherpad -c "/var/www/etherpad-lite/bin/run.sh" -s /bin/bash
? (It may be perfectly acceptable to have it at the end, but a quick internet search did not show any examples of that).su etherpad
and do anls /var/www/etherpad-lite/bin/run.sh
? Orls
the individual components? Rule out an actual permissions problem first and that may help you.