Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've got an app that works fine in the browser, but when run through the command line, throws a permission error (related to folder creation).

What could be the reason?

share|improve this question
up vote 4 down vote accepted

The fact that it will run as the apache user when you execute it in the browser and as another user when you started it from the command line, which might not have access rights in all the necessary directories.

share|improve this answer
Can I use the apache user through the command line? – Emanuil Rusev Sep 13 '11 at 12:29
Might be possible but is not recommended. Better try to fix your permissions. – Sven Sep 13 '11 at 12:32
@Emanuil Rusev .. you could try su - apache and then running it: but as SvenW said, it's not a good idea – warren Sep 13 '11 at 14:50

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.