Edit the sudoers file (with visudo
) and add a rule that allows the web server user to run the command without a password. For example:
www-data ALL=NOPASSWD: /path/to/script
More Related Contents:
- sudo in php exec()
- LAMP: How to create .Zip of large files for the user on the fly, without disk/CPU thrashing
- Run Bash Command from PHP
- Laravel PHP Command Not Found
- Executing a shell script from a PHP script
- Permission denied with bash.sh to run cron
- PHP exec $PATH variable missing elements
- Composer: file_put_contents(./composer.json): failed to open stream: Permission denied
- Bash script to run php script
- How to pass parameters from bash to php script?
- How to create a secure mysql prepared statement in php?
- How can I send a Firebase Cloud Messaging notification without use the Firebase Console?
- Get name of caller function in PHP?
- Upload a file using PHP
- Get JSON object from URL
- PHP Add element to every sub array of multi dimension array
- Prevent InnoDB auto increment ON DUPLICATE KEY
- How to prevent PHP sessions being shared between different apache vhosts?
- How to create a random string using PHP?
- PHP get file listing including sub directories
- Create a zip file and download it
- How to solve time out in phpmyadmin?
- jQuery $.ajax request of dataType json will not retrieve data from PHP script
- Laravel 5.4 on PHP 7.0: PDO Exception – Could not find driver (MySQL)
- How to access route, post, get etc. parameters in Zend Framework 2
- Vim inoremap for specific filetypes
- How to properly handle session and access token with Facebook PHP SDK 3.0?
- Browser displays � instead of ´
- php connection pooling mysql [duplicate]
- How do I use a class method as a callback function?