RE: [PHP] PHP User Permissions

From: Date: Fri, 13 Sep 2002 13:12:10 +0000
Subject: RE: [PHP] PHP User Permissions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116269@lists.php.net to get a copy of this message
[snip] Does anyone know how to define a PHP script (within itself) to run as a certain user. Currently my PHP scirpt runs as "nobody" and I need to change the user it runs as temporarily to get certain permissions to update a file. [/snip] A running script cannot change its own permissions, and if accessed from the browser will always run as Apache allows (which is generally nobody/nogroup). What you need to do is change the permission/owner of the file that you're trying to update with either chown(), chmod(), or both. HTH! Jay Good Judgement comes from experience; experience comes from Poor Judgement ***************************************************** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort & Conference Center * * New Braunfels, Texas * * Contact jay.blanchard@niicommunications.com * * * * Want to present a paper or workshop? Contact now! * *****************************************************

« previous php.general (#116269) next »