Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2000 18:41:10 +0100
From:      Mark Ovens <marko@freebsd.org>
To:        Kahn <erinf@deadbbs.com>
Cc:        questions@freebsd.org
Subject:   Re: Problems with tar.
Message-ID:  <20000804184110.C236@parish>
In-Reply-To: <Pine.BSF.4.05.10008040811160.23330-100000@hermes.deadbbs.com>; from erinf@deadbbs.com on Fri, Aug 04, 2000 at 08:17:19AM -0700
References:  <Pine.BSF.4.05.10008040811160.23330-100000@hermes.deadbbs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 04, 2000 at 08:17:19AM -0700, Kahn wrote:
> I realize that the problems are my fault, but I still need some help.
> 
> When I tar up the home directories on my server using "zcf" as my
> switches the file/directory ownerships are all reset to root:wheel and not
> the actual owner. I am untaring these on a different system and have not
> yet compiled the master.passwd with all of the user accounts, could that
> be the problem? Tar may not be seeing the user accounts active on the
> system so it resets the file/directory ownerships?
> 

tar(1) will preserve user & group info if possible. From the manpage:

   -x

   --extract
   --get     Extract files from an archive.  The owner, modification
             time, and file permissions are restored, if possible....

However, I think you are correct. The files become root:wheel because
the original owner/group don't exist on the target machine (user yoshi
and group users don't exist on my machine):

# tar ztvf waveplay-19990123.tar.gz
drwxr-xr-x yoshi/users       0 23 Jan 13:55 1999 waveplay-19990123/
-rw-r--r-- yoshi/users     321  9 Sep 06:24 1998 waveplay-19990123/Makefile
-rw-r--r-- yoshi/users     730  9 Sep 06:24 1998 waveplay-19990123/wavefmt.h
-rw-r--r-- yoshi/users    6990  9 Sep 06:24 1998 waveplay-19990123/waveplay.c
-rw-r--r-- yoshi/users    1084 23 Jan 13:55 1999 waveplay-19990123/README
-rw-r--r-- yoshi/users    1876 23 Jan 13:53 1999 waveplay-19990123/README.jp
# tar zxvf waveplay-19990123.tar.gz
waveplay-19990123/
waveplay-19990123/Makefile
waveplay-19990123/wavefmt.h
waveplay-19990123/waveplay.c
waveplay-19990123/README
waveplay-19990123/README.jp
# cd waveplay-19990123
# ls -l
total 13
-rw-r--r--  1 root  wheel   321  9 Sep  1998 Makefile
-rw-r--r--  1 root  wheel  1084 23 Jan  1999 README
-rw-r--r--  1 root  wheel  1876 23 Jan  1999 README.jp
-rw-r--r--  1 root  wheel   730  9 Sep  1998 wavefmt.h
-rw-r--r--  1 root  wheel  6990  9 Sep  1998 waveplay.c
# 


> 
> Thanks,
> 
> 
> Erin
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
  If I buy a copy of WinDelete, and it doesn't delete Windows,
  am I entitled to my money back?
________________________________________________________________
51.44°N  FreeBSD - The Power To Serve http://www.freebsd.org
2.057°W  My Webpage http://ukug.uk.freebsd.org/~mark
mailto:marko@freebsd.org                http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000804184110.C236>