1831461 Members
2929 Online
110025 Solutions
New Discussion

Re: tar archive question

 
Pocius Arturas
Advisor

tar archive question

When creating tar archive with options cvNfb
I can't get right user/groups ownership on files when verifying archive with options tvpfb.

Thanks.
11 REPLIES 11
Steve Steel
Honored Contributor

Re: tar archive question

Hi

Are you doing this as root.

If not then chown may be disabled.
see setprivgrp


p Cause file to be restored to the original modes and ownerships written on the archive, if possible. This is the default for the superuser, and can be overridden by the o function modifier. If system protections prevent the ordinary user from executing chown(), the error is ignored,
and the ownership is set to that of the restoring process(see chown(2)). The set-user-id, set-group-id, and sticky bit information are restored as allowed by the protections
defined by chmod() if the chown() operation above succeeds.


Note.tar is an old and trusted program but not great for modern systems. fbackup is better

Steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Pocius Arturas
Advisor

Re: tar archive question

I'm doing as root.
tar I'm using for portability.

Thanks.
H.Merijn Brand (procura
Honored Contributor

Re: tar archive question

What are the largest UID and GID? Some tar's can't cope with large values (maxshort = 32767)

For compatibility switch to GNU tar (https:/www.beepz.com/personal/merijn)
Enjoy, Have FUN! H.Merijn
Pocius Arturas
Advisor

Re: tar archive question

uid=102
gid=105
john korterman
Honored Contributor

Re: tar archive question

Hi,

perhaps a silly question, but was the verification performed immediately after the archive was created?

regards,

John K.
it would be nice if you always got a second chance
Pocius Arturas
Advisor

Re: tar archive question

Yes.
john korterman
Honored Contributor

Re: tar archive question

Hi again,

does the uid and guid you get listed during verification exist in /etc/passwd and /etc/group ? If yes, are the uids and guids unique in those files?

regards,

John K.
it would be nice if you always got a second chance
Pocius Arturas
Advisor

Re: tar archive question

Both exists and are unique.

Thanks
H.Merijn Brand (procura
Honored Contributor

Re: tar archive question

Just out of curiousity (my mind is blank about what leads to your problem now), did you try GNU tar, and if not can you?
Enjoy, Have FUN! H.Merijn
john korterman
Honored Contributor

Re: tar archive question

Hi again,

please explain what is not right about the user/groups ownership - and is it for all files of the archive, or for certain types only?

regards,
John K.
it would be nice if you always got a second chance
Pocius Arturas
Advisor

Re: tar archive question

GNU tar solved the problem.

Thank all for answers.