ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Preserving file permissions with <copy> task
Date Thu, 08 Jan 2009 13:13:14 GMT

check out this:

(from the copy task)
Unix Note: File permissions are not retained when files are copied; they end up
with the default UMASK permissions instead. This is caused by the lack of any
means to query or set file permissions in the current Java runtimes. If you need
a permission-preserving copy function, use <exec executable="cp" ... > instead.



> Hello,
> Does anybody whether it is possible to use the <copy> task while preserving
> the same permissions as the input files? My tests show that all created files
> all have the same file rights, whatever the rights of the source files. At
> least, I would like to preserve the 'x' attribute of some specific source
> files. I am using ant 1.7.0.
> Thanks,
> Loïc.
> --
> "Anyone who is capable of getting themselves made President should on no
> account be allowed to do the job."
>     Douglas Adams, The Hitchiker's Guide to the Galaxy
> Loïc Decloedt
> PIPD Methodolgy Software Engineer
> +33 4 56 38 47 35
> skype: loic.decloedt
> ARM Grenoble Design Center
> 60 rue des Berges
> F-38000 Grenoble

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message