LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to use tar -xzvf with a abc.tar.gz file (https://www.linuxquestions.org/questions/linux-software-2/unable-to-use-tar-xzvf-with-a-abc-tar-gz-file-77615/)

kakultech 07-31-2003 06:26 AM

Unable to use tar -xzvf with a abc.tar.gz file
 
Hai Folks,

I have download a file abc.tar.gz from internet .It is a driver for some device.I am using following command for extracting it.

tar -xzvf abc.tar.gz

it shows an error message like

can not change ownership to uid 324 67 ,gid 20:operation not permitted.

I am using P3 intel machine with Red Hat Linux 7.1 .

Waiting for reply
Thanx in advance.
Sachin Rastogi:
:newbie:

slakmagik 07-31-2003 06:43 AM

Hm. Have you tried changing permissions as root? What does 'ls -l abc.tar.gz' show? And what does 'file abc.tar.gz' say. Want to make sure it's actually a tarball, first, though it probably is or tar would have complained about that as well. I'm not sure what it means but I'm guessing someone set the permissions on the tarball weird and the system thinks you, as user, don't have permissions for the file. Does the site where you downloaded it from have any information about it?

kakultech 07-31-2003 07:08 AM

Hai digiot,

abc.tar.gz have following permission
-rwxr-xr-x
I m working as a superuser on mu system.Now pl . continue this problem

slakmagik 07-31-2003 07:27 AM

Oh. It must be a different kind of issue than I was thinking of - might have had it backwards.

I was about to give up but then found this:

http://www.linuxquestions.org/questi...2001/05/3/2635

Maybe it'll work if you're *not* root. If not, hopefully someone else can figure it out. :)

ppuru 07-31-2003 07:28 AM

kakultech

what does tar tzvf abc.tar.gz show?

acid_kewpie 07-31-2003 07:40 AM

are you sure it doesn't actually extract anyway? To me that looks like an error you'd get from trying to change attributes on a fat32 drive, which is impossible...

ozled 11-08-2010 11:03 AM

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:29 AM.