RE: [PHP] mkdir permission errors
| From: | Robert Cummings | Date: | Mon, 14 Jul 2008 19:42:40 +0000 |
| Subject: | RE: [PHP] mkdir permission errors | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276775@lists.php.net to get a copy of this message | ||
On Mon, 2008-07-14 at 15:37 -0400, Wei, Alice J. wrote:
> Hi, Rob:
>
> Here is the updated version from the correct command:
>
> [root@localhost htdocs]# ps awxu | grep -E 'apache|httpd'
> root 30957 0.0 0.5 27576 11016 ? Ss 14:27 0:00 /usr/sbin/httpd
> apache 30959 0.0 0.3 27708 7452 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30960 0.0 0.3 27576 6800 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30961 0.0 0.3 27576 6800 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30962 0.0 0.3 27576 6788 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30963 0.0 0.3 27576 6788 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30964 0.0 0.3 27576 6788 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30965 0.0 0.3 27576 6788 ? S 14:27 0:00 /usr/sbin/httpd
> apache 30966 0.0 0.3 27576 6788 ? S 14:27 0:00 /usr/sbin/httpd
> root 31299 0.0 0.0 4120 676 pts/1 R+ 15:36 0:00 grep -E apache|httpd
> [root@localhost htdocs]#
>
> Does this suggest anything?
Yep, apache is not running as root. It is running as user apache. Now go
to the parent directory and input the following command:
chown apache:apache <directoryName>
That will change the ownership/group to apache. And then apache can
write to it.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP