Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
This bug was initially created as a copy of Bug #1666850
I am copying this bug because: rhel8.0 also has this problem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root~]# mount localhost:/export_test/ /mnt/
[root~]# nfsstat -m
/mnt from localhost:/export_test
Flags: rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1
[root~]# touch /mnt/{first,second}
[root~]# nfs4_setfacl --test -s "$(nfs4_getfacl /mnt/first)" /mnt/second
Failed while inserting ACE(s).
[root~]# echo $?
1
[root~]# rpm -q nfs-utils nfs4-acl-tools
nfs-utils-2.3.3-14.el8.x86_64
nfs4-acl-tools-0.3.5-0.el8.x86_64
[root~]#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description of problem:
nfs4_setfacl -s fails with nfs4_getfacl output, error "Failed while inserting ACE(s)."
How reproducible:
Apply ACL to file. Create new file. Apply ACL from first file to new
file via nfs4_setfacl -s "$(nfs4_getfacl old)" new.
Steps to Reproduce:
1. Create first file on NFS4 mount with NFS4 ACLs enabled.
2. Touch second file.
3. Copy ACLs from first to second via nfs4_setfacl -s with nfs4_getfacl output.
This was caused due to the below patch.
nfs4_getfacl: Add support to accept more paths
http://git.linux-nfs.org/?p=bfields/nfs4-acl-tools.git;a=commit;h=6630629bb661a7f48fb9856f7fd9616ce1499efa
As we are accepting more paths it is necessary to print the filename for which the corresponding output is shown. (just like how getfacl does)
From code nfs4_getfacl/nfs4_getfacl.c
for (counter = 1; counter < argc; counter++) {
acl = nfs4_acl_for_path(argv[counter]);
if (acl != NULL) {
printf("\n# file: %s\n",argv[counter]); <--------------
nfs4_print_acl(stdout, acl);
nfs4_free_acl(acl);
res = 0;
}
}
$ nfs4_getfacl /test/
# file: /test/ <------------------------
A::OWNER@:rwaDxtTcCy
A::GROUP@:rwaDxtcy
A::EVERYONE@:rwaDxtcy
As "# file: /test/" is an invalid entry we get the below error.
Failed while inserting ACE(s). <---------------
To fix this issue we need to ignore the # line and proceed further.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2019:3664