Linux is good~ Always having permission problem. Always stopping me from making things work. Damn. Apache, which is the httpd service. Due to the fact that execution of bash script is done by thr "root" account, user Apache, have no permission to do it.
Fix the problem~
Problem is solved...
By cheating... Damn... Using the command, "
system('echo "ROOT PASSWORD" | sudo -u root -S COMMAND')"; will trigger the necessary access needed to run
iwlist.
Reference
http://stackoverflow.com/questions/5652986/php-sudo-in-shell-exec
No comments:
Post a Comment