archive file UID's after untarring
I had noticed a while back that when doing a directory listing of several directories in my filesystem, some of them appeared with what I thought were bogus UID/GID's. I was really worried that perhaps my filesystem was corrupt somehow, possibly something drastically wrong with the kernel -- but I checked with another backup server and it produces the same results. This happens with several archives.
After doing a 'tar zxvf' of an archive, the resulting directory and its contents looking like the following. (I issued the command as root)
4.0k drwxr-xr-x 22 1037 root 4.0k Apr 11 13:16 sendmail-8.13.4
1.9M -rw-r--r-- 1 root root 1.9M Apr 11 13:16 sendmail.8.13.4.tar.gz
Or
4.0k drwxr-xr-x 10 501 80 4.0k Apr 11 13:31 zlib-1.2.2
428k -rw-r--r-- 1 root root 420k Oct 3 2004 zlib-1.2.2.tar.gz
My best guess is that 1037 and 501 are the uid of the user that created the tar -- but I found that tar has options that tell it to keep the same owner information...but that is an extra option you are supposed to pass to tar that I am not giving it. I tried doing --no-same-owner and other things but cannot find a way to extract without keeping the UID/GID's. That is, without passing a lengthy --owner= --group= which shouldnt be necessary
The thing that really scared me was when archives were extracting with UID's that belong to other User's on the system, can anyone else verify that their archives by default are untarring like this?
|