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 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="${target.app.tar}"/> > <delete file="${target.di.tar}"/> > <tar destfile="${target.app.tar}"> > <tarfileset dir="${app.dir}" includes="**/*.ksh" prefix="app" > filemode="774" dirmode="774" username="${unix.user}" group="${unix.group}" /> > <tarfileset dir="${app.dir}" excludes="**/*.ksh" prefix="app" > filemode="664" dirmode="774" username="${unix.user}" group="${unix.group}" /> > <tarfileset file="${fwa.app.ear}" prefix="app/install" mode="664" > dirmode="774" username="${unix.user}" group="${unix.group}" /> > </tar> > <tar destfile="${target.di.tar}"> > <tarfileset dir="${di.dir}" includes="**/*.ksh" prefix="di" > filemode="774" dirmode="774" username="${unix.user}" group="${unix.group}" /> > <tarfileset dir="${di.dir}" excludes="**/*.ksh" prefix="di" > filemode="664" dirmode="774" username="${unix.user}" group="${unix.group}" /> > </tar> > </target> > > Thanks. >
What's your umask set to on the Unix system? -- Rick Genter rick.gen...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org