Project

General

Profile

Actions

Bug #57084

closed

Permissions of the .snap directory do not inherit ACLs

Added by Robert Sander over 1 year ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
% Done:

100%

Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
snapshots
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

when using CephFS with POSIX ACLs I noticed that the .snap directory does not inherit the ACLs from its parent but only the standard UNIX permissions.

This results in a permission denied error when users want to access snapshots in that directory because they are not the owner or in the group. They do have access to the directory via a group that is listed in the POSIX ACLs.

To reproduce:

mounted CephFS on /mnt/cephfs

# mkdir /mnt/cephfs/test

# chmod 0750 /mnt/cephfs/test

# ls -ld /mnt/cephfs/test
drwxr-x--- 2 root root 0 Aug 10 09:31 /mnt/cephfs/test/

# setfacl -m g:users:rwx /mnt/cephfs/test

# getfacl /mnt/cephfs/test
getfacl: Removing leading '/' from absolute path names
# file: mnt/cephfs/test
# owner: root
# group: root
user::rwx
group::r-x
group:users:rwx
mask::rwx
other::---

# mkdir /mnt/cephfs/test/.snap/snap01

# ls -la /mnt/cephfs/test/.snap
total 0
drwxrwx---  2 root root 0 Aug 10 09:31 ./
drwxrwx---+ 2 root root 0 Aug 10 09:31 ../
drwxrwx---+ 2 root root 0 Aug 10 09:31 snap01/

# getfacl /mnt/cephfs/test/.snap
getfacl: Removing leading '/' from absolute path names
# file: mnt/cephfs/test/.snap
# owner: root
# group: root
user::rwx
group::rwx
other::---

# getfacl /mnt/cephfs/test/.snap/snap01
getfacl: Removing leading '/' from absolute path names
# file: mnt/cephfs/test/.snap/snap01
# owner: root
# group: root
user::rwx
group::r-x
group:users:rwx
mask::rwx
other::---

Result: Members of the group "users" do not have access to the snapshots because the .snap directory does not carry the ACLs.

Should be: Members of the group "users" have access to the snapshots.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #57874: quincy: Permissions of the .snap directory do not inherit ACLsResolvedVenky ShankarActions
Copied to CephFS - Backport #57875: pacific: Permissions of the .snap directory do not inherit ACLsResolvedVenky ShankarActions
Actions #1

Updated by Venky Shankar over 1 year ago

  • Category set to Administration/Usability
  • Status changed from New to Triaged
  • Assignee set to Venky Shankar
  • Target version set to v18.0.0
  • Backport set to pacific,quincy
  • Component(FS) deleted (Common/Protocol)
Actions #2

Updated by Venky Shankar over 1 year ago

Thanks for the detailed report, Robert. This sounds like a bug.

Is this the user-space or the kernel client?

Actions #3

Updated by Robert Sander over 1 year ago

Venky Shankar wrote:

Is this the user-space or the kernel client?

It happens with kernel 5.15 and ceph-fuse 17.2.0. The test system is Ubuntu 22.04 jammy.

Actions #4

Updated by Venky Shankar over 1 year ago

  • Status changed from Triaged to Fix Under Review
  • Pull request ID set to 48086
Actions #5

Updated by Ramana Raja over 1 year ago

  • Description updated (diff)
Actions #6

Updated by Venky Shankar over 1 year ago

  • Status changed from Fix Under Review to Resolved
Actions #7

Updated by Venky Shankar over 1 year ago

  • Status changed from Resolved to Pending Backport
Actions #8

Updated by Backport Bot over 1 year ago

  • Copied to Backport #57874: quincy: Permissions of the .snap directory do not inherit ACLs added
Actions #9

Updated by Backport Bot over 1 year ago

  • Copied to Backport #57875: pacific: Permissions of the .snap directory do not inherit ACLs added
Actions #10

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #11

Updated by Konstantin Shalygin 8 months ago

  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF