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 am having trouble running a python file as the apache user.

When I run this command: sudo -u apache /etc/httpd/conf.d/upsell_by_id.py I get this error:

File "/etc/httpd/conf.d/upsell_by_id.py", line 8, in <module> keyword_groups = pickle.load(open("/home/zumodo/upsell_backup/upsells.pkl", "rb" )) IOError: [Errno 13] Permission denied: '/home/zumodo/upsell_backup/upsells.pkl'

However, the file in question has the following permissions:

-rwxrwxrwx.  1 skline skline 6.4M Dec  5 08:50 upsells.pkl

I am at a loss as to why the apache user is not allowed to open this file.

share|improve this question
    
isn't this essentially the same question as your other? serverfault.com/questions/337902/… –  thinice Dec 5 '11 at 23:06
add comment

1 Answer 1

up vote 2 down vote accepted

And the dot in the end of the permission list show that you have enabled SELinux extensions. They probably prevent you from reading the file. It could also be that some folders in the file path are not descend-able by the Apache user.

You have to give far more information before you get good answers.

share|improve this answer
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.