Page 1 of 1

Quick permissions issue, expert opinion appreciated...

Posted: Thu Dec 24, 2009 11:20 am
by scarface222
Hey guys, quick question. I have the following code in php that is supposed to create directories on my server

Code: Select all

mkdir("../../usercontent/$username",0666);
mkdir("../../usercontent/$username/images",0666);
mkdir("../../usercontent/$username/audio",0666);
mkdir("../../usercontent/$username/images2",0666);
The first one gets made (../../usercontent/$username) but the others say Permission denied. Also the first parent folder that gets made is made as 0644 permission instead of 0666 and is being created in a parent directory of 0755.

Anyone know what I can do and what would be the safest permissions for users uploading content and viewing it later?