Hi Robert, First, giving ownership to files is not the same as making them run as that user. Ownership of a file is directly related to what permissions are needed to do things with the file, like reading from, writing to, and executing it.
If you need to run PHP as root, you can use a utility called Sudo. However, since this is technically allowing anyone using the web server to do things as root, you MUST be unbelievable cautious with security. If you are not, then eventually you will get someone who will try to wreck or get into your system. Sudo is not JUST for root, however. It allows you to specify what user you want to be, and you can limit functionality to certain files or programs. I highly recommend you take at least a few days to thoroughly read Sudo's manual first, then search around the Net for Sudo-related material and ask for tips from people that are using it. Another trick is to set up a separate instance/installation of Apache running on a different port. Since you can specify what user Apache will run as, you can make that 2nd Apache be root or some other privileged user. But again, you MUST be cautious not to let anyone input any custom scripting that could get executed, otherwise you're letting a stranger send commands as root to the server. I recommend this second method if you're sure you can be secure with your programming. - Jonathan, SiteCreative.com -----Original Message----- From: Robert Abbate [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 10:44 AM To: [EMAIL PROTECTED] Subject: [PHP-INST] Re: using PHP as ROOT Hi. Many things. I am trying to create a web hosting control panel, so I'll need to be able to update Zone files, add email accounts, etc. All of which require the user to be "root" How can php do this? How do I get the scripts to be able to have root permissions? Robert <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Robert Abbate wrote: > > > > Hi. I am trying to have PHP do things as a ROOT user. Like: make files, > > change permissions of files etc... > > > > however, I cannot do it! Even if I give the php scripts root ownership, it > > still says that apache is the owner of the files, and hence, I can't do > > anything with them. > > > > Does anyone have any insight? > > > > Thanks, > > Robert A > > Hello, > > What thing do you want to do ? > > Edward. <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Robert Abbate wrote: > > > > Hi. I am trying to have PHP do things as a ROOT user. Like: make files, > > change permissions of files etc... > > > > however, I cannot do it! Even if I give the php scripts root ownership, it > > still says that apache is the owner of the files, and hence, I can't do > > anything with them. > > > > Does anyone have any insight? > > > > Thanks, > > Robert A > > Hello, > > What thing do you want to do ? > > Edward. -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]