NYCPHP Meetup

NYPHP.org

[nycphp-talk] File Write Permission Errors - HELP! URGENT!!!

Dan Horning dan at dwc.to
Mon Nov 25 12:44:05 EST 2002


If you have root access to your server do this

su -
cd to the root of that particualar php section
 ( such as /home/sites/siteX/ with the web forlder within)

chown httpd -R /web
(doing this assumes your apache server runs under the user httpd ) 
This will handle php permissions for most of the cases
The only disadvantage is you have to "su" to make changes to that
particular system


----------



-----Original Message-----
From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] 
Sent: Monday, November 25, 2002 10:35 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] File Write Permission Errors - HELP! URGENT!!!


On Mon, Nov 25, 2002 at 07:31:33AM -0500, Phil Powell wrote:

> Warning: fopen("/users/ppowell/web/chat/nicknames.txt", "a") - 
> Permission denied in /users/ppowell/web/chat/chat.php on line 163 ... 
> snip... If anyone can help, please tell me what to do, the PHP manuals

> are not giving me a clear solution as to how to write to a file that 
> does not yet exist that has to have the permissions of 0755 for both 
> files.

You need write permissions on the directory in order to be able to
create 
files in it.  Remember, the user that PHP is running as is the one you 
need to give the permissions to.

--Dan

-- 
 Bush's proposed Department of Homeland Security would be exempt from:
    * the Freedom of Information Act   * procurement rules
    * labor collective bargaining      * whistle blower protection
 The real goal?  Eliminating government accountability.
http://www.senate.gov/general/contact_information/senators_cfm.cfm


--- Unsubscribe at http://nyphp.org/list/ ---





More information about the talk mailing list