<tar destfile="${archive.dir}/${tar.name}" longfile="gnu" compression="gzip"> <tarfileset dir="${work.dir}/deploy" [b]mode="755"[/b] username="${tar.user}" group="${tar.group}"> <include name="bin/**"/> </tarfileset> </tar>
根据自己的需要修改mode的值即可
<tar destfile="${archive.dir}/${tar.name}" longfile="gnu" compression="gzip"> <tarfileset dir="${work.dir}/deploy" [b]mode="755"[/b] username="${tar.user}" group="${tar.group}"> <include name="bin/**"/> </tarfileset> </tar>