Re: : permission problem www-data

From: Date: Wed, 19 Jan 2011 00:38:29 +0000
Subject: Re: : permission problem www-data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310847@lists.php.net to get a copy of this message
On 1/18/2011 4:44 AM, Moses wrote:
Hi Everyone, I am creating a file in PHP script which takes a value from a form and writes it to a file. However, i don't have the mode permission for the file instead it is owned by www-data.What can i do to ensure that the file is owned by me. drwxr-xr-x 2 www-data www-data 4096 2011-01-17 22:01 18757170111.0 -rw-r--r-- 1 www-data www-data 40 2011-01-17 23:39 32238.hydro Thanks.
Either have a PHP script create the directory, OR Using FTP access, set the dir perms to 757, or 777. The xx7 makes the dir world writable. For protection, put a .htaccess file in the dir like: # Prevent Direct Access to Files from outside world <Files *> Order Deny,Allow Deny from all </Files> Or put your dir above the webspace, [DOCUMENT_ROOT}

« previous php.general (#310847) next »