Forum Moderators: coopster

Message Too Old, No Replies

Writing files to webspace question

         

pblancher

9:24 pm on Apr 27, 2006 (gmt 0)

10+ Year Member



I am working on a bit of a content editor for a site. Once the content is ready to be saved, it is to be written to a php file that would look like this:

<? include($_SERVER['DOCUMENT_ROOT']."includes/header.php");
?>
Content
<? include($_SERVER['DOCUMENT_ROOT']."includes/footer.php");
?>

I have only found two ways of letting the site get written to. Make the directory the file is residing as 777, which leaves it open for anything, or setting the owner as nobody. Setting the owner of the filespace as nobody is good to a point and is more secure than setting the mode to 777, but surely I am overlooking something.

TIA,

Phil

jatar_k

4:23 pm on Apr 28, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you need to have the web user be able to write, the scripts may be executing as nobody.

if the web user isn't in the same group or isn't the owner of the dir then it goes into the 'other' category and will mean you probably need the final 7