[thelist] PHP: mkdir and rmdir possible, but not chgrp, why?

Dominique Paquin dpaquin at galeasec.com
Thu Mar 22 10:59:53 CST 2001

I posted a message last week on the php news group on this subject, and I
have searched for an answer meanwhile. So i am trying here since i did not
find the answer to my problem:

I use a web based application I am making and through this application I
create directories. I can create the directories with no problem using PHP
with full rights (777). The directories, then, needs to have their group
changed to something else and here is my problem,

I tried a chgrp (the php function) from php to change it as well as
exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...)
and system('chown'...). All this to no success. Someone told me, on the
php.general list, that apache was runing as nobody:nobody, so it had no
rights to change
rights. We changed the user:group of apache and called it apache:apache.
then we re-tried all our experiences, to no avail. I am sure I am having all
the rights necessary because I can delete the directories I create with no

Note: If I connect in console mode with the user apache, i can chown the
directory as I wish.

Any suggestion on how to change rights on directories would be appreciated.
(With PHP or any other solution)

Thanks in advance

Dominique Paquin
Galea secured networks

More information about the thelist mailing list