0

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?

UPDATE:

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

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .