Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] tar restore file ownership
  • From: Kenneth Schneider <suselist@xxxxxxxx>
  • Date: Fri, 07 May 2004 08:33:28 -0400
  • Message-id: <1083933208.12444.3.camel@xxxxxxxxxxxx>
On Thu, 2004-05-06 at 10:34, Carlos E. R. wrote:
> Hi,
> I have and old tar archive I want to restore. However, I notice that
> directories from the tar archive are created with the current date and
> owned by root:root - I'm running tar as root - whereas the files (not
> directories) are restored with the original permissions, ownerships, and
> dates.
> I use "tar -xvzp -f archive.tgz" for restoring.
> Is that normal? Am I doing something wrong, or was the archive created
> without ownership information for directories?
> If it is, as I think, that the tar archive does not have that info, what
> option, if any, should have been used to create the archive originally?
> --
> Cheers,
> Carlos Robinson

One additional option you may try is:


although I believe this is a default setting. You may also try using:

tar tzvf archive.tgz | less

to see the ownership and perms associated with the files.

Ken Schneider
unix user since 1989
linux user since 1994
SuSE user since 1998 (5.2)

< Previous Next >
Follow Ups