My PHP-Script creates files and folders.
Like...
mkdir("newfolder");
Those files'/folders' permissions are automatically set to: "755"; the owner and group to: "www-data".
When logged in via sftp, i can't delete/modify those folders, because i'm not the user "www-data" and even though i'm part of the same group, it would probably need "775" permission to allow changes.
So, my question is:
- How can i make PHP to create those folders with my username as owner?
- ...or to run as 'myusername' instead of 'www-data'?
- ...or to set 775 as the default permission?
I'm on Debian, Apache2, PHP 5.6.
umaskof the account www-data, so that files and folders are created with different permissions granting write access to group members. In addition you accept your own user account into the www-data group. - arkascha