OK.  I'm always willing to help fix a linux bug.  :-)

Here's the scoop.  I created the shell script on linux (Red Hat).  I
used a GUI program (FTP Voyager) to transfer it to my PC, which is
running Windows XP and cygwin.  When I look at the file with cygwin, it
has a group ID of -1.  I have group -1 set in my /etc/group to "UNKNOWN"
so I don't see all those ugly 4294967295's in my ls -l listings (which
is the actual ID assigned to this file).  Then, on cygwin:

$ ls -l
total 28
-rwxrwxrwx 1 jrw UNKNOWN 24597 Sep  4 23:58 bug.sh
$ grep UNKNOWN /etc/group
UNKNOWN::-1:-1:::
$ tar cvf bug.tar bug.sh
bug.sh
$ echo $?
0
$ tar --numeric-owner -tvf bug.tar
-rwxrwxrwx 63018/4294967295 24597 2009-09-04 23:58 bug.sh
$ echo $?
0

So, I'm not getting any errors from gnu tar running under cygwin.  When
I transfer the tar file back to linux, I am able to un-tar it without
any errors, both as root and as an unprivileged user.  When I un-tar it
as root, it receives the GID of 0 (the UID is the same as my cygwin
UID).  On my Red Hat linux, uname -a gives:

Linux thusmneagdbc05 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:46:26 EDT 2008
x86_64

I hope that helps.  I think the bottom line is:

- Apparently Windows XP assigns "groups" to files which are interpreted
by cygwin as GID -1 or GID 4294967295.
- Neither of my tar or un-tar commands has any problem dealing with
those GIDs, either on 64-bit linux (where it's mapped to 0 by root) or
on cygwin (where's it's stored as 4294967295 in the tar file).

-- John

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Glenn Fowler
> Sent: Thursday, September 10, 2009 11:24 AM
> To: [email protected]; [email protected]; 
> [email protected]; Wiersba, John (Healthcare USA)
> Subject: [ast-developers] RE: Position-dependent ksh bug
> 
> 
> for gnu tar this command
>       tar --numeric-owner -tvf your-archive
> shows
> -rwxrwxrwx 63018/4294967295 24597 2009-09-04 19:58:57 ./bug.sh
>                  ^^^^^^^^^^
> that gid corresponds to the header bytes
>       200  \0  \0  \0 377 377 377
> which is not a valid ascii octal number
> gnu tar merrily convert that anyway and fails, showing -1
> 
> so I'm not interested that I didn't get your gid
> I'm interested in knowing how the bytes for gid got corrupted
> was it the gnu tar write, or the posting process, or unposting process
> 
> why? because if the is a widespread gnu tar bug then I will have to
> add a workaround to ast pax to handle it (with a warning)
> 
> I know this is off course for your ksh bug
> thanks for following up
> 
> On Thu, 10 Sep 2009 10:21:10 -0400  wrote:
> > That was a simple tar cvf TAR_FILE TARRED_FILE, but not as 
> the root user
> > (as my own ID).  I would not expect my UID or GID to necessarily be
> > present on your server, but that doesn't normally cause a 
> problem when
> > running tar -x as an unprivileged user.
> 
> _______________________________________________
> ast-developers mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-developers
> 
> 

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to