note 53782 rejected from function.system by betz
| From: | betz@php.net | Date: | Mon, 13 Jun 2005 13:54:36 +0000 |
| Subject: | note 53782 rejected from function.system by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90354@lists.php.net to get a copy of this message | ||
Note Submitter: angelo dot calafato at euroconcepts dot it
----
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?