LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-28-2005, 02:47 PM   #1
p_garg
LQ Newbie
 
Registered: Sep 2005
Location: delhi
Posts: 11

Rep: Reputation: 0
a tough question 4 u, problem in extracting tar & tar.gz files


halo friends,

when i am extracting tar.gz files with command tar xvzf, i am getting a message in every file, cannot change file ownership to uid uid no., cannot change file ownership to gid gidno., & one more thing is showing in that, file ownership of this tar file is 0755, when i am trying to change file ownership with chmod to 0777, it is not permiting me to do this. i think problem is with file permissions. this problem is not with a single package, a lot of package i am trying to extract, all having same problem. neither its a problem of linux vesion, bcaz 1st i am getting this problem in version 4, then i installed version 3, but same problem i get there also. plz tell me what to do.
 
Old 09-28-2005, 03:36 PM   #2
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
Maybe you need to extract the file as root? or add the p option to the tar command to preserve permissions, so tar xzpvf .tar.gz or tar xjpvf .tar.bz2
 
Old 09-28-2005, 03:40 PM   #3
p_garg
LQ Newbie
 
Registered: Sep 2005
Location: delhi
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by tomj88
Maybe you need to extract the file as root? or add the p option to the tar command to preserve permissions, so tar xzpvf .tar.gz or tar xjpvf .tar.bz2

no even after trying xzpvf option for that , the result is same.
 
Old 04-04-2006, 01:15 PM   #4
teto
LQ Newbie
 
Registered: Oct 2005
Distribution: Fedora Core
Posts: 6

Rep: Reputation: 0
try extracting without the "z" opion , only the "xvf" is enough
 
Old 04-04-2006, 01:46 PM   #5
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,771

Rep: Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070
What are the permissions of the directory the .tar.gz is located in? Go to it's parent directory, and run ls -ld directoryname to find out.

As for the z option, you need it if you're trying to extract a .tar.gz file, for a .tar file xf is enough. So you could first run gunzip on a .tar.gz file to get a .tar file then run tar with xf. The v is never needed, it stands for verbose, causes the names of the files to be outputed when you run tar.
 
Old 11-08-2010, 11:02 AM   #6
ozled
LQ Newbie
 
Registered: Apr 2006
Location: France
Distribution: FC4, Suse 10
Posts: 6

Rep: Reputation: 1
Belated answer

I know it has been a long time, but this thread appears at the top of the Google search so this may help someone.

When extracting with tar, the default for the root user is that tar attempts to retain the owner:group of the files originally stored in the tar.
When transferring tar files across systems, this may cause problem if the same user does not exist in the target machine.
Using the option --no-same-owner will force tar to extract the files and assign them root as owner.
The error does not appear when extracting with a normal user because in that case the default option is --no-same-owner.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting multiple files with tar -xjvf logicalfuzz Linux - Software 3 11-06-2005 01:21 AM
geting problem in extracting tar files p_garg Linux - Enterprise 1 09-29-2005 02:53 PM
hey geting problem in extracting tar files in version 4 p_garg Linux - Networking 1 09-29-2005 02:48 PM
extracting tar.bz2.gz files crank Linux - Newbie 5 04-18-2004 11:33 PM
Question on extracting a tar.gz VampiricuS Linux - Newbie 4 10-22-2003 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:01 AM.

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