4 Replies Latest reply: Nov 30, 2006 10:48 PM by 807567 RSS

    Tar

    807567
      Sorry to trouble you, i have one minor problem:
      I have created tar-archive under root. After execution files from the archive the ownership of fiiles is lost ( all files and directories have "root" userid and "other" groupid ). Which keys for tar command i need to use if i want to save this ownership?
      The key -p is not help.
        • 1. Re: Tar
          user4994457
          Are you extracting the files as root also?

          --
          Darren
          • 2. Re: Tar
            807567
            Yes.
            • 3. Re: Tar
              807567
              Try recovering with different user ID and if still appears as root the ownership try with -R option to change the userID for all.
              • 4. Re: Tar
                807567
                Hi,
                To have the default user while extracting, please use option "o" along with "x".
                I.e tar -xovf <filename.tar>

                Sun9 man page says;

                o Ownership. Assign to extracted files the user and
                group identifiers of the user running the program,
                rather than those on tarfile. This is the default
                behavior for users other than root. If the o function
                modifier is not set and the user is root, the
                extracted files will take on the group and user iden-
                tifiers of the files on tarfile

                HTH,
                Prabu.S