I have a group on linux named mygroup. and have a user named apache. apache is the member of mygroup.
i created a sample php file and uploaded on sever
<?php
$structure = '/my_repo/hello';
if (!mkdir($structure, 0, true)) {
die('Failed to create folders...');
}
?>
myrepo dir is at root level and is group is mygroup and owner is root. permissions are 764.
when i accessed my file on http://mydomain.com/sample.php
it gives me the following error
[warn] mod_fcgid: stderr: PHP Warning: dir(/my_repo/hello)
[<a href='function.dir'>function.dir</a>]: failed to open dir:
Permission denied in /var/www/clients/client1/web2/web/sample.php