Re: phpinfo returns a permission error
| From: | Kevin Kinsey | Date: | Tue, 14 Feb 2006 22:22:11 +0000 |
| Subject: | Re: phpinfo returns a permission error | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230390@lists.php.net to get a copy of this message | ||
Dave M G wrote:
Well, I'd sure suspect this. PHP/Apache are probably running as "nobody", "daemon", "www", or somesuch, and the permissions on the file above only allow the user "dave" to read (and write to) this file. Try: $ chmod 644 /home/dave/web_sites/phpinfo.phpand this: $ ls -l /home/dave/web_sites/phpinfo.phpIt says: -rw------- 1 dave dave 20 2006-02-13 22:45 /home/dave/web_sites/phpinfo.php
and see if you can read the file.In addition, do some checking on your umask, or try and remember how you created this file. A umask of 22 should produce "-rw-r--r--": [624] Tue 14.Feb.2006 16:15:58 [kadmin@archangel][~/daleco/software/Windows] umask 22 [625] Tue 14.Feb.2006 16:17:00 [kadmin@archangel][~/daleco/software/Windows] touch foobar && ls -l foobar -rw-r--r-- 1 kadmin wheel 0 Feb 14 16:17 foobar but obviously, yours did not. "022" is the default umask for most shells. Seems likely that you were running your editor/IDE/whatnot setuid root, perhaps? HTH, Kevin Kinsey -- Don't hate yourself in the morning -- sleep till noon.