Can changes to Linux files be modified in Ant
Is there a way to set file ownership and permissions using Ant in Linux ? I found Ant chmod
and tasks chown
, but they are only for Unix.
I am trying to add a Debian installer via Ant and ant -deb-task , and after moving all the required files to the deployment directory, I need to set their ownership and permissions.
+3
Ross drew
source
to share
2 answers
I don't have access to Ant on Linux at this time (will do at home), but try to see if that works
<target name="chmod_task">
<exec executable="chmod">
<arg value="755"/>
<arg value="/path/filename.ext"/>
</exec>
</target>
+2
amphibient
source
to share
Use the built-in Ant task chmod - http://ant.apache.org/manual/Tasks/chmod.html
Separate file:
<chmod file="${dist}/start.sh" perm="ugo+rx"/>
multiple files:
<chmod perm="g+w">
<fileset dir="shared/sources1">
<exclude name="**/trial/**"/>
</fileset>
</chmod>
+1
MisterSmith
source
to share