No usefull message when Strip ACL fails

ElectricEel-24.10.1
GUI https://IP/ui/sharing/smb
Shares - SMB
button → Edit Filesystem ACL (for SMB share)
button → Strip ACL
check box
button → Strip ACL

Get error FAILED. It should provide more meaningful message.

# FAILED

[EFAULT] /mnt/fn/Bo: Failed to strip ACL on path:
More info...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 509, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 556, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1367, in run_in_thread
    return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1364, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 183, in nf
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 55, in nf
    res = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem_/acl.py", line 890, in setacl
    return self.setacl_nfs4(job, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem_/acl.py", line 590, in setacl_nfs4
    self._strip_acl_nfs4(path)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/filesystem_/acl.py", line 186, in _strip_acl_nfs4
    raise CallError(f"{path}: Failed to strip ACL on path: {stripacl.stderr.decode()}")
middlewared.service_exception.CallError: [EFAULT] /mnt/fn/Bo: Failed to strip ACL on path:

Interesting. What are the permissions on the path before you try to strip the ACL on it?

In CLI it shows

-rwxrwxr-x    473  473
-rwxrwx---   1000 1000

In GUI it says

Access Control List
owner@ - ?  Allow | Full Control
group@ - ? Allow | Full Control
User - 1000 Allow | Full Control
everyone@  Allow | Special

What is output of nfs4xdr_getfacl for the path?

$ nfs4xdr_getfacl /mnt/fn/Bo

# File: /mnt/fn/Bo
# owner: 1000
# group: 1000
# mode: 0o40770
# trivial_acl: false
# ACL flags: auto-inherit:
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         user:1000:rwxpDdaARWcCos:fd-----:allow
         everyone@:--------------:fd-----:allow

Can you post full job information for the failed setacl job? midclt call core.get_jobs | jq (and then scroll through to the one generating that error).

Is perhaps the dataset in question readonly?

Yes it was readonly.

Okay. I just added a validation error for backend to prevent permissions change attempts on readonly filesystems. I believe there was already a UI defect ticket to grey-out buttons on readonly filesystems.

1 Like