ant 权限被拒绝问题
解压 ant 文件并将其保存到 opt/ 目录并设置路径变量后 到 $ANT_HOME/bin
我在 CentOS 5 上运行了以下命令
ant -version
,但收到以下错误
-bash:/path/opt/apache-ant-1.8.2/bin/ant: Permission denied
是否有我应该设置的某些权限或此问题的一些典型来源?
谢谢!
After extracting and saving the ant files into an opt/ directory and setting the path variable
to $ANT_HOME/bin
I ran the following command on a CentOS 5
ant -version
and I am getting the following error
-bash:/path/opt/apache-ant-1.8.2/bin/ant: Permission denied
Is there some permission I am supposed to set or some typical source of this problem?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您拥有该文件,请尝试
如果其他人拥有该文件,则
sudo
或成为 root,那么您需要对该文件具有执行权限;第一个仅向所有者授予执行权限,如果您拥有该文件并且是唯一使用该文件的人,则可能更可取。第二个需要 root 权限,并向所有人授予执行和读取权限,以及所有者的写入权限。
您可以通过运行 ls -l /path/opt/apache-ant-1.8.2/bin/ant 查看文件的当前权限和所有权。
If you own the file, try
If someone else owns it, either
sudo
or become root thenYou 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
.