[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
contrary to docs, tar --xattr alone does not extract all xattrs
From: |
Christoph Anton Mitterer |
Subject: |
contrary to docs, tar --xattr alone does not extract all xattrs |
Date: |
Wed, 23 Nov 2022 20:28:25 +0100 |
User-agent: |
Evolution 3.46.1-1 |
Hey.
This is with tar 1.34 from Debian unstable.
The info page claims in 4.3.2 Extended File Attributes:
> Attribute names are strings prefixed by a "namespace" name and a dot.
> Currently, four namespaces exist: 'user', 'trusted', 'security' and
> 'system'. By default, when '--xattr' is used, all names are stored
> in the archive (or extracted, if using '--extract').
However, when doing e.g. (as root):
# tar --selinux --xattrs --acls --numeric-owner --preserve-permissions -cf
x.tar /bin/ping
with:
# getcap /bin/ping
/bin/ping cap_net_raw=ep
and then:
# tar --selinux --xattrs --acls --numeric-owner --preserve-permissions -xf x.tar
the file has lost its capabilities:
# getcap bin/ping
#
However, on the same archive file (without recreating it) when using --
xattrs-include='*':
# tar --selinux --xattrs --xattrs-include='*' --acls --numeric-owner
--preserve-permissions -xf x.tar
# getcap bin/ping
bin/ping cap_net_raw=ep
This should either be fixed or some information should go into at least
these sections:
- manpage, at the --xattr option
- info page 3.4.2 'tar' Options, at the --xattr option
- info page 4.3.2 Extended File Attributes
where it should be mentioned, which namespaces are not included per
default.
Thanks,
Chris.
PS: Please keep me CCed if replying.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- contrary to docs, tar --xattr alone does not extract all xattrs,
Christoph Anton Mitterer <=