I actually try to launch a gnome-terminal with a PHP script, and seems I have some problems with the users
My script only makes an
ls -l command in a directory (is just for a test) and I run it with a php page on my local website.
Here is the gnome-terminal command in my bash script (it runs perfectly when I double-click):
gnome-terminal --working-directory=/opt/cuckoo -x bash -c "ls -l"
and here is the call on the php-page:
I have some "echo" in my script and I see it in the PHP page after I try to run the script with the website.
www-data doesn't have the permissions so I try to give the user ownership of the script with the
chown command with no result, and at last I tried the
sudo visudo command and gave
www-data root permissions for this script only (with
NO PASSWD arg).
It didn't work. I tried to change the php command, replacing
exec, and show the result with
$output but it's the same as well.
Can PHP really run a terminal or did I maybe fool myself?