ant Permission Denied problem ant Permission Denied problem shell shell

ant Permission Denied problem


If you own the file, try

chmod u+x /path/opt/apache-ant-1.8.2/bin/ant

If someone else owns it, either sudo or become root then

chmod 755 /path/opt/apache-ant-1.8.2/bin/ant

You need to have execute permissions on the file; the first gives execute permissions to the owner only and is probably preferable if you own the file and are the only one that uses it. The second requires root privileges and gives execute and read permission to everyone, plus write permission to the owner.

You can view the current permissions and ownership of the file by running ls -l /path/opt/apache-ant-1.8.2/bin/ant.