ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <>
Subject Copy paradox - permissions and filters
Date Fri, 07 Apr 2006 17:37:47 GMT


I have found a dilemma on what ought to be a simple task.   I need to
copy some files from one location to another and run them through a


OK, great.  Ant has filters I can use.

Wait... these are scripts.  They need to be executable.

Ant's copy task doesn't preserve file permissions.  

According to the manual, if you want file permissions preserved, either
you set your default umask or exec out to a "cp" command.

But apparently umask isn't really a simple mathematical permissions
mask.  Setting a umask of 000 won't give you rwx permissions, for

And if I resort to exec'ing the cp command, then I can't use the filters
I wanted to use.

The only thing remaining is a kludge that captures the states of the
files before copy and then uses chmod to restore them after the copy.
That's cheesy and I don't want to do it. 


Anybody run into this before?


The information transmitted is intended only for the person or entity to which it is addressed
and may contain confidential, proprietary, and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If you received this
in error, please contact the sender and delete the material from all computers. 117

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message