1827802 Members
2362 Online
109969 Solutions
New Discussion

Tar error

 
Kim Porter
New Member

Tar error

couldn't get uname for uid 9175. there is no user 9175 and never has been. Also when I do a find it does not come up with any files owned or touched by this user or the gid 42424. I know I can ignore it but it is taking up thousands of lines in my tar file.
5 REPLIES 5
Michael Tully
Honored Contributor

Re: Tar error

Hi,

I've seen this many times when you do a download from a site a compressed tar archive.
They may come with a uid and gid that was owned
on their system. This will explain where the
mysterious numbers come from. I know that
downloading an apache version from apache has
this exact problem.
Try:

find / -user "9175" -print
find / -group "42424" -print

HTH
Michael
Anyone for a Mutiny ?
Patrick Wallek
Honored Contributor

Re: Tar error

The messages that are coming up are informational messages and do NOT occupy any extra space in the tar file.

As was said, this is almost surely due to a downloaded tar archive that had that specific uid. No harm anywhere with this message.
Deepak Extross
Honored Contributor

Re: Tar error

Kim,
What command are you using to untar the files? Far as I know, "tar xf " does not crib about undefined users and groups.
In any case, there is an upside to tarballs from public ftp sites having unreasonably high UIDs and GIDs - if you had a user "johndoe" with UID 9175, then a listing of the tar files whould show "johndoe" as the owner. Which could create a little bit of confusion.
Just my $0.02.
Shannon Petry
Honored Contributor

Re: Tar error

The easiest way to fix the file system error is untar the tape as a user and NOT root. The way tar is built, a non root user assumes ownership of the files when extracted and their umask is applied. As root, original modes are restored.

If you have to re-create the tape, again as a real user (make sure they can read what needs to be put on tape.

Last, there is a nice way to find all the files not owned by anyone will take a bit of work, but I'll point you in the direction.
find / -depth -exec /bin/ls -l {} \; >>/somebigarea/bigfilelist
*Syntax is critical!
If you look at the file, you should be able to see the columns dealing with user/group. (You'll probably have to widen your terminal though...).

awk has a very nice builtin from C (isnum) so that you can cat the file, pipe to awk, if user/group is a number then changemod it! :)

It's a big chore, and always test scripts before you run them!!!!!!

Have fun, and remember the beauty is that there are many unique ways to solve any problem!

Shannon
Microsoft. When do you want a virus today?
John Carr_2
Honored Contributor

Re: Tar error

Hi

totally agree with the guys why these UID's exist.

I change my false ID's to real ID's using the following command

find . -user "9175" -exec chown real_user_name {}\;

find . -group "42424" -exec chgrp real_group_name {} \;

If you do this tar will stop complaining.

If you have lots of false UID's and GID's let us know and we will expand to accomodate.

good luck
John.