PDA

View Full Version : chmod a file or folder through a PHP file



DmX
04-18-2003, 10:09 PM
Hi
I have designed a few PHP scripts in the past but I would like to create a sort of installer file that will setup all the file permissions needed to run a program.

Does anyone know if it is actually possible to chmod a file or folder through a PHP file and if so how?

Any help would be really good

Logic
04-19-2003, 09:33 AM
It sure is possible... :)
You can use chgrp, chmod, chown, a such in php as long as you use it like so...



chgrp("/path/to/file/foo.bar", "apache");
chmod("/path/to/file/dog.poo", 0755);

x.c.
10-26-2003, 09:23 PM
you can always do system()
:)