ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pepersack, Bob G" <>
Subject Problem with filemode Attribute of tarfileset
Date Wed, 25 Jul 2012 17:59:58 GMT
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

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 rw--r--r--.

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 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="${}" />


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message