Maven: Bash Mvn Permission Denied

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

mvn: Permission denied


bash: /usr/local/apache-maven/apache-maven-3.2.5/bin/mvn: Permission denied

Typical reasons why this can happen:

  • You don't have exec permission on the file /usr/local/apache-maven/apache-maven-3.2.5/bin/mvn
  • You don't have exec permission on one or more of the directories leading up to that file:
    • /usr/local/apache-maven/apache-maven-3.2.5/bin
    • /usr/local/apache-maven/apache-maven-3.2.5
    • /usr/local/apache-maven
    • ...
  • The partition of /usr/local/apache-maven/apache-maven-3.2.5/bin is mounted with the noexec flag on

If you check each of these and resolve, you should be able to execute.

Getting permission denied issue after adding Maven bin to PATH variable, unable to add to PATH in root mode as well

Your user needs to have execute rights on the /opt/apache-maven/bin/mvn

Maven All-of-a-sudden Receiving Permission Denied

It turns out that in my case it was an IPV6 issue. On my Windows 7 environment I had to add an environment variable for MAVEN_OPTS with a value of -Djava.net.preferIPv4Stack=true (you have to restart your command line).

I hope this helps!

exec-maven-plugin cannot execute .sh script: permission denied

You need to set the appropriate permissions to the script and put the permission also into your version control either git (.gitattributes) or in Subversion (svn:executable property).



Related Topics



Leave a reply



Submit