Anything under /root is usually owned by the root user. PHP does usually not (and for security reasons should never) run under the root user. You should install the gsutil
in a location where PHP has execute rights. For example, copy it to /var/www
:
cp /root/gsutil/gsutil /var/www/gsutil
I think that under Ubuntu PHP usually runs as the www-data
user (not 100% sure though), so you'll need to change ownership of the file to that user:
chown www-data.www-data /var/www/gsutil
Finally, make sure the file is executable for the owning user/group (www-data) by setting chmod 770:
chmod 770 /var/www/gsutil
Then set your PHP script to run /var/www/gsutil
instead and all should run fine.