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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-28-2005, 03:47 PM
|
#1
|
LQ Newbie
Registered: Sep 2005
Location: delhi
Posts: 11
Rep:
|
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.
|
|
|
09-28-2005, 04:36 PM
|
#2
|
Member
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334
Rep:
|
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
|
|
|
09-28-2005, 04:40 PM
|
#3
|
LQ Newbie
Registered: Sep 2005
Location: delhi
Posts: 11
Original Poster
Rep:
|
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.
|
|
|
04-04-2006, 02:15 PM
|
#4
|
LQ Newbie
Registered: Oct 2005
Distribution: Fedora Core
Posts: 6
Rep:
|
try extracting without the "z" opion , only the "xvf" is enough
|
|
|
04-04-2006, 02:46 PM
|
#5
|
Senior Member
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,809
|
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.
|
|
|
11-08-2010, 12:02 PM
|
#6
|
LQ Newbie
Registered: Apr 2006
Location: France
Distribution: FC4, Suse 10
Posts: 6
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 12:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|