Page 1 of 1

[Solved] Apache's file permission

Posted: Sun Jul 10, 2005 12:06 am
by angusfighter
dear all talented and helpful

i am frustrated with the case below
it sounds a PHP problem at first, but im suspecting now that it is an apache problem

when i was writing a PHP script, i desperately found that
i could not write files (fopen) or change the modes of files (chmod)
even i have checked, by is_writable(), the file has a permission:

Code: Select all

-rw-r--r--
i just try to access local files, not the one need to stream or what
is it anything do with apache's file permission directives setting?

i am using PHP 5.0.4 and Apache 1.3.33, with Mac OS X local server
thx for you guys notice this message....

Posted: Sun Jul 10, 2005 9:22 pm
by McGruff
Above, only the owner of the file has the write permission, so it looks like php isn't the owner. To view owner, group & etc try "ls -avl [path to dir]" if you've got shell access to a nix server or, if not, you could try displaying owners & groups in an ftp program.

Posted: Tue Jul 12, 2005 9:03 pm
by angusfighter
thx a lot

dear site admin
i edited the httpd.conf in Apache
and altered the running account from "www" to the windows account i'm using
and then it works.

More:
viewtopic.php?t=35403&highlight=