0

Hi I have been trying to use the shell_exec() without success don't know why.

If I use the command that I have on the shell_exec('');

$output = shell_exec('/home/steam/bin/./arkmanager status @main');

and it doesn't return the same as I run it on the console line.

Its there a way to force apache to use a specific user for that command ?!

Trying to do a small backend to restart a server/update and such without the need to go into the putty and so one.

Thanks in advance

1 Answer 1

2

apache/www-data don't have permissions to restart daemons .

For this to work you need to add apache as sudo user and allow only that partiular command to run without sudo password

in /etc/sudoers file add

www-data ALL=NOPASSWD:/home/steam/bin/./arkmanager status @main

it will work

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.