2016-02-11 157 views
0

我试图从ant文件执行一个shell脚本,但它给出的错误如下: [exec]/bin/sh:./abc.sh:Permission denied [执行]结果:126从蚂蚁脚本执行.sh文件的权限被拒绝

我的代码片断是:

<exec dir="." executable="/bin/sh"> 
       <arg line="-c './abc.sh -s ${arg1}'" /> 
     </exec> 

之前执行脚本,如果我设置的权限如下我仍然得到同样的错误。

<chmod file="/abc.sh" perm="777"/> 

回答

0

试试这个。希望它可以帮助

<chmod file="shell-script-location" perm="g+w" type="file"/>

您可以选择类型=“文件”或“目录”或“既”