PHP's user

Discussion in 'Server Operation' started by v2k, Apr 1, 2008.

  1. v2k

    v2k New Member

    Running perfect setup fedora 7.

    Warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 500 is not allowed to access /var/www/html/test owned by uid 48 in /var/www/html/test.php on line 139

    apache is user 48 and that's the user that is running apache. however, php is running as another user on the system. how do I get it to run php using the apache user?
  2. topdog

    topdog Active Member HowtoForge Supporter

  3. v2k

    v2k New Member

    I was just trying to get everything running through safe_mode. I think what was happening is that not all the php files were owned by apache. So when it included some files by other users it switched its uid. I did a:

    chown -hR apache /html/*

    and that seems to have worked on my test server.

Share This Page