ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Genter <>
Subject Re: Problem with filemode Attribute of tarfileset
Date Wed, 25 Jul 2012 19:38:47 GMT

On Jul 25, 2012, at 10:59 AM, Pepersack, Bob G wrote:

> I'm using the tar task with tarfilesets to create tar files on Windows 7.  I'm using
the filemode attribute of the tarfileset type to set the UNIX permissions on the files contained
by the tar.  Then, I upload the tars to our UNIX server and unzip them with this command:
 tar -xvf mytarfile.tar
> I want create -rwxrwxr--  permissions on my .ksh files using filemode="774", but they
untar with -rwxr-xr-- .
> For files other than .ksh, I want to create -rw-rw-r--  using filemode="664", but I get
> If I set the second digit to zero, then I get the correct result:  -rw----r--.  So turning
on write permission for the group doesn't work, but turning it off does work.  I've even tried
adding a dirmode attribute set to 774 but it didn't help.  I've also run my build in verbose
mode and debug mode, but there was no output regarding the UNIX file permissions.
> Here is the target for my tar:
>    <target name="create-tar" >
>        <delete file="${}"/>
>        <delete file="${target.di.tar}"/>
>        <tar destfile="${}">
>            <tarfileset dir="${app.dir}" includes="**/*.ksh" prefix="app" filemode="774"
dirmode="774" username="${unix.user}" group="${}" />
>            <tarfileset dir="${app.dir}" excludes="**/*.ksh" prefix="app" filemode="664"
dirmode="774" username="${unix.user}" group="${}" />
>            <tarfileset file="${}" prefix="app/install" mode="664" dirmode="774"
username="${unix.user}" group="${}" />
>        </tar>
>        <tar destfile="${target.di.tar}">
>           <tarfileset dir="${di.dir}" includes="**/*.ksh" prefix="di" filemode="774"
dirmode="774" username="${unix.user}" group="${}" />
>            <tarfileset dir="${di.dir}" excludes="**/*.ksh" prefix="di" filemode="664"
dirmode="774" username="${unix.user}" group="${}" />
>        </tar>
>    </target>
> Thanks.

What's your umask set to on the Unix system?
Rick Genter

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

View raw message