maven: bash mvn permission denied

Your permission shows that you can't execute that file. Modify permissions for that file. If you want all the users in the machine should be able to execute that file, then do this :

chmod a+x /usr/local/apache-maven/apache-maven-3.1.1/bin/mvn

/usr/local/apache-maven/apache-maven-3.1.1/bin/mvn does not have the execute permission. This should be able to fix it:

chmod a+x /usr/local/apache-maven/apache-maven-3.1.1/bin/mvn