I am using mkdir in PHP to create a directory if it doesn't exist. However it seems to be failing to set the write part of the permissions.
mkdir('/path/to/directory/', 0775, true);
Looking at this us ls -l in shell shows that the directory has drwxr-xr-x the write permissions for group have not been set.
Even if I try to set 0777 permissions the write is not set for both group and everyone.
Is there something I am missing?