Regular users don't have the ability to change file ownership (only group,
assuming they're a member of the target group and own the file), so this is
mainly a consideration if you're running tar as root. By default, if you're
running as root, GNU tar assumes the --same-owner switch, which preserves
the ownership in the archive. If the IDs are different, you can use --owner
or --owner-map to translate the IDs. If you need to get even trickier, you
can use --to-command and pass the stream to your own custom filter.

On Wed, Mar 03, 2021 at 09:53:42AM -0500, Jerry Geis wrote:
> When I "tar" up an archive the files have an owner bob,
> when I extract that to another machine bob is there also but user number is
> different.
> So when I extract bob is no longer the owner of the files but someone else.
> 
> Is there a good way to account for this ?
> User ID on one box being different to the next box ?
> 
> I was expecting to untar and bob still be the owner .
> 
> Thanks,
> 
> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> https://lists.centos.org/mailman/listinfo/centos

-- 
-- Skylar Thompson (skyl...@u.washington.edu)
-- Genome Sciences Department (UW Medicine), System Administrator
-- Foege Building S046, (206)-685-7354
-- Pronouns: He/Him/His
_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos
  • [CentOS]... Jerry Geis
    • Re:... R C
    • Re:... Valeri Galtsev
      • ... Bernstein, Noam CIV USN NRL (6393) Washington DC (USA) via CentOS
    • Re:... Skylar Thompson
    • Re:... Stephen John Smoogen
    • Re:... Gordon Messmer

Reply via email to