NYCPHP Meetup

[nycphp-talk] using PHP to create a php file

Michael Southwell michael.southwell at nyphp.org
Wed Jun 7 20:54:09 EDT 2006


At 08:09 PM 6/7/2006, you wrote:
>When I try to write the new php file it fails because it has no
>permissions to create
>a file in the web directory.  No httpd is being run by use nobody and
>the file itself is
>own by root.
>
>Why can I create php file on this directory?

You just said yourself why you can't:  because your script has no 
write permissions.  chmod the target directory to 777 and you will be 
able to write to it. Alas, so will anybody else, so there is a 
certain security risk involved here.  Only you can decide whether the 
ability to write is worth the risk that others can also.  (You might 
however consider writing to somewhere outside the web directory if 
that is possible in your context.)


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses 




More information about the talk mailing list