[Bug 2015539] Re: `numeric-owner` doesn't apply to ACL entries

Ubuntu Foundations Team Bug Bot 2015539 at bugs.launchpad.net
Fri Apr 7 12:29:25 UTC 2023


The attachment "Extend numeric owner to ACL-entries" seems to be a
patch.  If it isn't, please remove the "patch" flag from the attachment,
remove the "patch" tag, and if you are a member of the ~ubuntu-
reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tar in Ubuntu.
https://bugs.launchpad.net/bugs/2015539

Title:
  `numeric-owner` doesn't apply to ACL entries

Status in tar package in Ubuntu:
  New

Bug description:
  1) The release of Ubuntu you are using
  Description:	Ubuntu 22.04.2 LTS
  Release:	22.04

  2) The version of the package you are using
  tar:
    Installed: 1.34+dfsg-1ubuntu0.1.22.04.1
    Candidate: 1.34+dfsg-1ubuntu0.1.22.04.1
    Version table:
   *** 1.34+dfsg-1ubuntu0.1.22.04.1 500
          500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
          500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
          100 /var/lib/dpkg/status
       1.34+dfsg-1build3 500
          500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

  3,4) What you expected to happen and what happened instead
  ACL entries store references to numeric uids/gids. on platforms that have libacl, use `acl_to_any_text` to generate ACL strings that preserve those numeric identifiers if `numeric-owner` is set (instead of doing a conversion to user/group name, like the acl_to_text function does).

  reproducer (similar ones exist where a user/group of the stored name
  exists, but has a different numeric identifier):

  system A with user foo with uid 1001
  system B with no user foo
  file with ACL referencing uid 1001 on system A

  on A:
  $ echo 'bar' > file
  $ setfacl -m u:foo:r file
  $ tar --acls --xattrs --numeric-owner -cf test.tar file
  $ tar -vv --acls --xattrs -tf test.tar

  expected output:
  -rw-r--r--+ 0/0         4 2022-01-26 14:32 file
    a: user::rw-,user:1001:r--,group::r--,mask::r--,other::r--

  actual output:
  -rw-r--r--+ 0/0         4 2022-01-26 14:32 file
    a: user::rw-,user:fakeuser:r--,group::r--,mask::r--,other::r--

  on B:
  $ tar --acls --xattrs -xf test.tar
  $ getfacl -n file

  expected output (extraction) - none
  expected output (getfacl):
   # file: file
   # owner: 0
   # group: 0
   user::rw-
   user:1001:r--
   group::r--
   other::r--

  actual output (extraction):
  tar: file: Warning: Cannot acl_from_text: Invalid argument

  actual output (getfacl) - note the missing user entry:
   # file: file
   # owner: 0
   # group: 0
   user::rw-
   group::r--
   other::r--

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tar/+bug/2015539/+subscriptions




More information about the foundations-bugs mailing list