View Full Version : Apache permissions

01-26-2003, 09:35 PM
Basically, this has cropped up in two of my scripts - one which creates and stores images and one which is a poll. I need to be modifying/creating files. What I don't want to do is set them to chmod 777, for obvious reasons. However, setting them to anything else returns errors indicating that permission was denied or whatever. What should I set them too? If this is not possible, can I set them to 777 temporarily and then reset them to something safe from within my PHP scripts?


01-26-2003, 09:43 PM
try looking at www.php.net/chmod :)

01-26-2003, 11:27 PM
This ought to help -- for one script (I haven't tested it yet). However, my issue is with creating files. Can I chmod a directory? I've tried to no avail and there seems to be no similar command specific to directories. Do I even need to?

01-29-2003, 11:20 AM
Maybe a linux howto or manpage might help out... If you want to create files in a dir, you'll need write-access in that directory. You can set this once from within the prompt (telnet, ssh). Use chmod 666 for reading and writing files.