I have an extracted file of maven in my remote. I am trying to add the environment variables using these commands:
export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.1 export M2=$M2_HOME/bin export PATH=$M2:$PATH
When I execute mvn -version
, I get this particular error :
Error: /home/z222189/apache-maven-3.2.1/bin/mvn: Permission denied
How do I run my Maven commands on Putty which I am using to access my remote Linux server?
Advertisement
Answer
Your user (z222189) doesn’t have execute permission on maven.
You should manage with chmod +x /path/to/exec
if you have root access (make sure you also have read access)