Page 1 of 1

Change Unix permissions using a web interface

Posted: Wed Aug 14, 2002 6:30 am
by noguru
Hi

I want to create a website where an admin user can specify permissions for certain users on certain UNIX directories using my web interface instead of doing it on the command line with the chmod command. How will I go about to accomplish this? I know a script file must be created containing the actual chmod command followed by the permission attributes (send as parameters), but I don't know how to create this script file in UNIX and also how to execute it with php code. I don't know Unix that well. Any help will be appreciated.

Thanks

Posted: Wed Aug 14, 2002 7:09 am
by Johnm
I do not think that you need a shell script to do this although it would work.
Look up the PHP functions:
system() and exec().

Direwolf

Posted: Wed Aug 14, 2002 7:15 am
by twigletmac
You can use the chmod() function in PHP. chmod is explained here: http://cs-www.bu.edu/help/unix/using_chmod.html

Mac

Posted: Wed Aug 14, 2002 7:17 am
by Johnm
Ahhh yes... the old chmod() trick... <g>