LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2005, 04:59 AM   #1
nmolinos
LQ Newbie
 
Registered: Nov 2003
Location: Richmond, VA
Distribution: Slackware
Posts: 29

Rep: Reputation: 15
Question 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?
 
Old 04-12-2005, 11:02 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
i was about to say *no* that never happens but i went and looked at zlib your example and i have

drwxr-xr-x 9 501 80 1680 2004-12-22 12:13 zlib-1.2.1
-rw-r--r-- 1 gary users 345833 2004-12-19 22:12 zlib-1.2.1.tar.gz

my source directory is full of stuff like this
appearently some developers are using the keep permission switch or more propably using some graphical archiver that does this by default


Last edited by foo_bar_foo; 04-12-2005 at 11:58 PM.
 
Old 04-13-2005, 12:00 AM   #3
nmolinos
LQ Newbie
 
Registered: Nov 2003
Location: Richmond, VA
Distribution: Slackware
Posts: 29

Original Poster
Rep: Reputation: 15
Ok, thanks a lot for your response -- makes me feel a bit more comfortable!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
split file archive hiptrop General 1 10-26-2005 12:28 AM
How can I extract a file from iso archive kmichal2 Linux - Software 8 12-14-2004 05:48 AM
An error in untarring a file ? gopikrish Linux - Software 2 08-20-2004 07:06 PM
Stupid question- Untarring a file? randon Linux - General 4 11-10-2003 02:42 PM
how to create a archive .a file using g++? hari_linux Programming 0 03-07-2003 09:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration