Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script that I need to run. It is kicking off a java program. When I run it as me, it seems to work fine. If I type "sudo" it does not run fine. In reality, I need to run it as "sudo -su otherguy"

So neither of the sudo versions work. I get errors from the java program that make me think there are permission problems - file not found, could not write, etc etc. So what can I do to figure out why it is losing permissions? The funny thing is, I made the entire directory structure wide open with chmod -fR 777 * to try to figure out if it would run at those otehr users, and I still get the same error.

share|improve this question
Post the specific errors. – Rob Wouters Jan 25 '12 at 22:35
Any chance NFS is involved in this? root usually has no permissions on NFS filesystems. – Mika Fischer Jan 25 '12 at 22:41

It is difficult to be sure without seeing the specific errors or the source of the script involved, but especially with the "file not found" issue, it sounds like an environment issue to me.

Have you tried running the script as another user without using sudo? You may have something extra in your $PATH, etc. that is necessary, but that isn't currently set for other users.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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