日本語のみで絞り込む
2009/10/21 -You can put the required commands in a separate script/executable file (sh, PHP, a real executable, doesn't matter), change its owner to root, ...
2011/12/24 -I am attempting to run shell commands with sudo root privileges using exec() but can't seem to get it to work.
2011/11/7 -Your sudoers line is granting access to execute "my_script.php" while your shell_exec is invoking "my_script.sh". When a password is not ...
2018/8/4 -The general idea is to write a tiny C program to run your command as root. As an example we'll create a wrapper to restart the mysqld service ...
To run a command in background, the output must be redirected to /dev/null. This is written in exec() manual page. There are cases where you need the output to ...
2012/9/4 -I strongly disagree that running something with higher privs from a web server is always a bad idea. The security problems from a web ...
2016/4/22 -I have a php script calling a bash script like this: <?php $result = exec('sudo /bin/bash /var/www/my_bash_script.sh / ...
It is important to note that this method requires that the user running the PHP script have explicit permission in /etc/sudoers to execute the command as root.
2024/2/5 -This post shows how to execute PHP scripts as a root user on Ubuntu/Linux using visudo. What do you need to run PHP as root? You will need to ...
2010/4/11 -I am trying to create a simple web interface for my phone to preform simple server operations such as restart deamons. in my php file im calling