Permissions with mkdir wont work

seanyboyyo

New Member
I cant understand why i have to use \[code\]chmod\[/code\] to get the correct permissions..The file is created succesfully but with 0755 and not 0775 that i specify in \[code\]mkdir\[/code\] .( http://php.net/manual/en/function.mkdir.php )I have to do \[code\]chmod\[/code\] after \[code\]mkdir\[/code\] to set the correct permissions.Safe mode is off in php.ini and the folder belongs to php's group and owner (www-data)This doesn't works:\[code\] if(!is_dir("/var/www/customers/$username/$project_name")) { mkdir("/var/www/customers/$username/$project_name",0775); }\[/code\]But this does:\[code\] if(!is_dir("/var/www/customers/$username/$project_name")) { mkdir("/var/www/customers/$username/$project_name"); chmod("/var/www/customers/$username/$project_name",0775); }\[/code\]
 
Back
Top