I got errors while untaring the symlink archive for the NeoGeo arcade.
I copied NeoGeo-MVS_2021-12-28.tar to /media/usb0 where my games directory resides, sshed into MISTer and typed the following:
cd /media/usb0
tar -xvf *.tar
A bunch of symlinks were untared but it ended up with:
tar: games/mame: Cannot change ownership to uid 1000, gid 40: Operation not permitted
tar: games/mame: Cannot change mode to rwxr-sr-x: Operation not permitted
tar: games: Cannot change ownership to uid 1000, gid 40: Operation not permitted
tar: games: Cannot change mode to rwxr-sr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
Questions:
Were all the symlinks untared? To check for it would be a hell of a job.
How is it possible to avoid such errors? My Linux is rusty.
Need help with the tar command
- lagerfeldt
- Posts: 170
- Joined: Mon Jan 03, 2022 8:32 pm
- Location: Denmark
- Has thanked: 33 times
- Been thanked: 85 times
- Contact:
Re: Need help with the tar command
Have you tried adding "--no-same-owner" to the command?
tar -xvf *.tar --no-same-owner
I assume you're running as root.
tar -xvf *.tar --no-same-owner
I assume you're running as root.
-
- Top Contributor
- Posts: 606
- Joined: Fri Jan 22, 2021 4:36 pm
- Has thanked: 77 times
- Been thanked: 302 times
Re: Need help with the tar command
These errors happen because the ExFAT filesystem doesn't know what to do with file ownership or permissions (the 'mode' references you're seeing). They're perfectly harmless in this context.
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: Need help with the tar command
Thanks to all.
@lagerfeldt: good to know this option.
@gibs: I was running as root so did not think sudo would help and did not try.
@Bas: correct with ExFAT, I don't know why I did not think it was the cause of the error. I knew it was harmless, just curious if everything was untared and to avoid it in the future. I guess no option would prevent the errors.
As I got 2 errors I guess they are related to the directories (games and mame) and not the symlinks themselves.
Edit:
As I got 2 sets of errors after the symlinks have been untared I guess they are related to the directories (games and mame) and not the symlinks themselves. So I shouldn't have wondered if all the symlinks had been untared or not.
@lagerfeldt: good to know this option.
@gibs: I was running as root so did not think sudo would help and did not try.
@Bas: correct with ExFAT, I don't know why I did not think it was the cause of the error. I knew it was harmless, just curious if everything was untared and to avoid it in the future. I guess no option would prevent the errors.
As I got 2 errors I guess they are related to the directories (games and mame) and not the symlinks themselves.
Edit:
As I got 2 sets of errors after the symlinks have been untared I guess they are related to the directories (games and mame) and not the symlinks themselves. So I shouldn't have wondered if all the symlinks had been untared or not.