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 have a dedicated server running php with dso handler, I am including a global config.php from one account into all the other accounts. This works fine on apache when opening the sites via browser.

But I also have some cron jobs, and there i get "permissions denied" error when trying to include the config.php file.

The main config.php is in user1 account, so I tried adding user2 (which includes user1 config.php) to the user1 group, but that didn't worked, the error still persist.

How could I fix it without having to modify all the files that include the main config.php file?


i "fixed" it by adding the user2 to the nobody group. It seems to work fine, but could it generate some other problems?

share|improve this question

Every web server uses Effective uid and gid ,

Definition :

Effective username and group name are defined in /etc/passwd and /etc/group

For example apache on Debian distro uses www-data group and www-data user. You should set your web data to them.Such as :

chown www-data.www-data YOURROOTDIR/ -R

Suggestion :

You should find out to how set your distro its effective uid and gid.Then act to chown.Because each distro uses one effective uid and gid.

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.