Are you running on Windows?  There is no chmod on windows.  The Windows
file system permission system is different than the Unix file system
permission system.

If you're running on a Unix variant (Linux, macOS, FreeBSD, Solaris,
AIX, OpenBSD, hp-ux, etc.), is the chmod command in the PATH of the ant
process?

Mark Waite

On Mon, May 7, 2018 at 5:04 AM Ganesh MN <[email protected]>
wrote:

>
> Hi,
>
> I am running ant task to change permission of files form Jenkins tool.
> But, I am getting following exception.
> Can someone please help me to resolve this issue.  Waiting to here form
> you guys.
>
> ant task:
>
>        <target name="test">
> <echo message="--changing filepermission--"/>
> <chmod perm="ugo+rx">
> <fileset dir="/home/quoteapp/test2/">
>                              <include name="test.txt" />
>                       </fileset>
> </chmod>
> </target>
>
>
> console output:
>
> Execute failed: java.io.IOException: Cannot run program "chmod": 
> java.io.IOException: error=2, No such file or directory*16:26:24*    at 
> org.apache.tools.ant.taskdefs.Chmod.execute(Chmod.java:183)*16:26:24*        
> at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)*16:26:24*
>        at org.apache.tools.ant.Task.perform(Task.java:364)*16:26:24*   at 
> org.apache.tools.ant.Target.execute(Target.java:341)*16:26:24*       at 
> org.apache.tools.ant.Target.performTasks(Target.java:369)*16:26:24*  at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)*16:26:24*
>        at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)*16:26:24*      
> at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)*16:26:24*
>         at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)*16:26:24*     
> at org.apache.tools.ant.Main.runBuild(Main.java:668)*16:26:24*  at 
> org.apache.tools.ant.Main.startAnt(Main.java:187)*16:26:24*  at 
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)*16:26:24*        
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>
>
>
>
> Thanks,
>
> Ganesha
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/24a9930d-3751-4b20-a026-25d5fc1a9a98%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/24a9930d-3751-4b20-a026-25d5fc1a9a98%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFzcYw9LE5xLEueuKKyq-uo7mENttbyHFKDW7CCopSt0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to