PHP mkdir() permissions PHP mkdir() permissions php php

PHP mkdir() permissions


You should try with the umask

$old = umask(0); mkdir($path,0777); umask($old); 


You can try:

chmod ( string $filename , int $mode )

See if that can fix the permissions issue.


Apache might not have the permissions to change this. What you can do is. Make sure that apache is running in the same group as your current files group. Then apache will be able to make changes to that file. You can change you apache group in this apache config. Or the easiest way is to change the entire project user to be the apache user. Then apache can make w.e changes it wants.

go to the file from your server and type ls -al and look at the user and group