Chmod 755 mkdir

I have a directory /foo

this directory’s permissions are set to 755

the whole space is running php as cgi

/foo/index.php cannot mkdir “thumbs” (auto thumbing gallery script)

Shouldn’t 755 be sufficient in this setup?!


755 only sets your folder to read/execute. If you wish to give the folder write access for cgi users, you need to set the last 5 to either a ‘6’ or a ‘7’

chmod 756 (for read/write only) foo
chmod 757 (read/write/execute) foo


Actually if I do 756 I get “Forbidden”, if I try 757 I get the same problem, no mkdir.

777 works to make the directory and thumbs, but then I have a directory/files I can’t delete (thumb/*) as it was created by another user. But isn’t the script supposed to run as my user since it’s php cgi?

See I’m confused about 3 ways here, all intertwined. To make matters worse I run the very same script on my own site and 755 works fine. There however I do not have php-cgi enabled globally on the domain, but I use the file extension pcgi instead, should be the same thing though shouldn’t it?

I’m deeply confused