I am trying to run adb from PHP using:
exec( 'adb devices', $output, $return_val );
but I get 126 error.
I think the problem is that php is running as 'www-data' user and does not have permissions to execute adb.
Any solutions?
|
I am trying to run adb from PHP using:
but I get 126 error. I think the problem is that php is running as 'www-data' user and does not have permissions to execute adb. Any solutions? |
|||
|
|
|
This page shows that this error code means a permission problem or the program can not be executed. If your program is executable (have If it requires super user privilege, you need to setup sudo without password for www-data to execute this command. You need to edit sudoers file using
To run a command as different user, you can use the form:
|
|||||||
|