Running Gradle from PHP

We are creating an automated system to build Android apps using a web application. We have setup almost everything but when trying to launch gradle from PHP using shell_exec command, we got a permission denied. We have the gradle binary into an user directory, and the code is running from the webserver. We have changed the permissions (and ownership too) to Gradle but still we are not able to do it… Any questions how can we solve that? We are using Linux CentOs and Gradle-2.3… Everything works fine running from the command line.!

Seems pretty likely that the user running the webapp does not have execute permissions for the gradle (or gradlew) script