I have a PHP script which runs in first server and it curls the PHP file which is on the second server.

```
$service_url = 'http://example.com/version_check.php?f_path='.$path;

```

On the second server, that PHP file (`version_check.php`) reads the files in `/var/www` directory and processes it.
Now I want to know how to access `/var/www` directory with root privileges.
I need root privileges because I am doing some `fwrite`s in that directory.