vfs_ceph: explicitly enable libcephfs POSIX ACL support
authorDavid Disseldorp <ddiss@samba.org>
Fri, 12 Apr 2019 11:52:43 +0000 (13:52 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 12 Apr 2019 18:38:20 +0000 (18:38 +0000)
libcephfs disables ACL support by default and returns -EOPNOTSUPP in the
POSIX ACL get/setxattr paths as a result. Enable support by setting the
following Ceph config parameters during mount:
        client acl type = posix_acl
        fuse default permissions = false

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13896

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_ceph.c

index 38ffe08887e16008d15ac2220bc4af606eedda54..cf45fb4c919f227766dc44d0fe9807d76a513425 100644 (file)
@@ -119,6 +119,17 @@ static int cephwrap_connect(struct vfs_handle_struct *handle,  const char *servi
                goto err_cm_release;
        }
 
+       /* libcephfs disables POSIX ACL support by default, enable it... */
+       ret = ceph_conf_set(cmount, "client_acl_type", "posix_acl");
+       if (ret < 0) {
+               goto err_cm_release;
+       }
+       /* tell libcephfs to perform local permission checks */
+       ret = ceph_conf_set(cmount, "fuse_default_permissions", "false");
+       if (ret < 0) {
+               goto err_cm_release;
+       }
+
        DBG_DEBUG("[CEPH] calling: ceph_mount\n");
        ret = ceph_mount(cmount, NULL);
        if (ret < 0) {