Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
Might be possible but is not recommended. Better try to fix your permissions. –  SvW Sep 13 '11 at 12:32
1  
@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
add comment

Your Answer

 
discard

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.