I want to run a executable file on my server when a user clicks a button on webpage. I am able to run the executable using exec command but the program runs under 'nobody' even if I followed the instructions in post : How to run from PHP a bash script under root user answer by : Riateche
But still the execuable file runs under 'nobody'
My executable program is kept in directory
/opt/lampp/htdocs/project
My php code
<?
$variable = 10;
$site_dir = 'project';
echo "<img src ='".exec('/opt/lampp/htdocs/' . $site_dir .'/myProgram '.' '.$_GET['value1'] .' '. $variable )."'>";
?>