cancel
Showing results for 
Search instead for 
Did you mean: 

mkdir permissions

N/A

mkdir permissions

Hey all,

I'm hastily slinging a set of free php scripts into my CGI space, ready for when I go off to eastern europe for a few months. The idea being that I can upload photos, annotate, have user comments etc, while also being able to alter a few features...

Problem is, it's reporting that it doesn't have permissions to create directories! I'm running it from http://cgi.weasel.force9.co.uk/travel/ and have set this directory to chmod 775, and this is where it tries to create the directory...

Anyone got any thoughts on this?


Thanks!


Weasel.
4 REPLIES
N/A

mkdir permissions

It's the command mkdir($base_directory, 0755) that it spazes out on.
N/A

mkdir permissions

you need to chmod 707 your directory which will allow the webserver the ability to run write commands in that directory.

WARNING: this directory and any files in it (permissions set or not) can be written to by any user on the CGI server when set to 707. People not setting this responsibly got hit by the recent worm targeting phpBB as it got on the server and had access to everyone's sites.

To only allow the webserver write access you need to chmod 705 the dir and give ownership to wwwuser, however someone knowing what they were doing could get the webserver to hand over authority to themselves, then you would be completely locked out of this directory. So my advice is just to 707 it.

I know, gaping security holes.

Jarv
N/A

mkdir permissions

Yeah, that seems to work. Thanks for that Jarv... holes duly noted! I'll have to make sure that everything's backed up every day or two, so that if anything obvious happens I can roll back. Damn those 31337 h4x0rs eh.

Smiley
N/A

mkdir permissions

np dude !