note 53782 added to function.system
| From: | angelo dot calafato at euroconcepts dot it | Date: | Mon, 13 Jun 2005 12:08:23 +0000 |
| Subject: | note 53782 added to function.system | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90348@lists.php.net to get a copy of this message | ||
What is the user that executes a bash command via the php system()
function embedded in a php web page? I assume that it will be the
webserver user (www-data or thinks like this). In this case how to
change the user to execute correctly some scripts?
e.g. if in a web page I write:
<?php
system('touch /root/test.txt');
?>
it is not possible if the /root directory gives no write permissions for
everyone. So, how these permissions are handled via the system()
function?
----
Manual Page -- http://www.php.net/manual/en/function.system.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53782
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53782&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53782&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53782&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53782&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53782&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53782&report=yes
Search -- http://master.php.net/manage/user-notes.php