Re: performing tasks with a user's rights

From: Date: Sat, 03 Feb 2001 00:42:36 +0000
Subject: Re: performing tasks with a user's rights
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37926@lists.php.net to get a copy of this message
"Nathaniel Hekman" <NHekman@geo-slope.com> wrote: > Is there any way for a php script to perform some task as a particular user? Install PHP as a CGI (this is actually the default install method). When run as a CGI, a particular PHP script will run with the permissions of the user who owns the file. You most likely have PHP installed as an Apache module. You can have it installed as both an Apache module and CGI simultaneously. If you want to run the CGI PHP scripts via the web you'll need to assign a different file extension than the extensions you have assigned for the Apache module version. ".phpc" is what I typically use. > I'd like to provide an easy way for them to change their passwords (at > least, and possibly also edit some files like their aliases file (virtual mail > hosting) and so on). Another alternative would be to insert the user input into a database or a text file and then run a cron job [as frequently as you need] as root to check the db or file for changes and then update the necessary files. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/

« previous php.general (#37926) next »