Enabling acl support in zfs plugin (correct solution?)

    • OMV 2.x
    • Enabling acl support in zfs plugin (correct solution?)

      Hi there,

      I am just testing (playing?) with the zfs plugin and zfs in general.
      After a few hours, I realized that there was no acl support (activated in the gui).
      I enabled acl support for my pool (acltype, ...).
      After that I realized that this changes nothing and the "plugin" (web interface) does not support it.
      I browsed the source a bit and found

      OMVFilesystemBackendAbstract.hasPosixAclSupport.

      I edited the source file (OMVStorageZvol.php) directly an my test server and now I can view and edit the acl entries.
      A quick cross check with getfacl shows that the permissions are set correct, which makes sense because the used zfs version has full posix acl support.

      The question is:

      Is this right? Is this the correct implementation (assumption: posix support is always enabled)?
      Or are there any issues with this "solution"?
      It seems quite hacky and I found no documentation about this matter.

      Thanks in advance

      The post was edited 1 time, last by Omvii ().

    • This wasn't looked after in the development stage. There were other priorities and it was left behind. Can you post the patch in diff here so @nicjo814 can test it. If it works you'll need to fill the feature request at bugtracker.openmediavault.org for modifying the acl backend to accept
      zfs in the webui
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • This part of the plugin was done quite some time ago so please forgive me if I'm not remembering things correctly :) I "think" that acl support was not yet properly implemented in ZoL when I built the file system back end and thus I disabled it in OMVStorageZvol.php. If it works now I would very much appreciate to see the changes you've done to verify the functionality. I don't think any changes are required in the the core OMV back end since we're just overloading the default methods (I might be wrong about this part, but we'll see).
    • Currently my edited hasPosixAclSupport of class OMVFilesystemBackendZFS just returns true.
      But that is not correct (correct me if I am wrong):

      [IMG:http://fs5.directupload.net/images/151007/asawgd5c.jpg]

      To do it right, I think, the source code of omv has to be changed (for all filesystems):
      Move function hasPosixAclSupport from class OMVFilesystemBackendAbstract to OMVFilesystemAbstract
      and call it later (see pic).

      The post was edited 1 time, last by Omvii ().

    • nicjo814 wrote:

      Now I might be completely wrong, but wouldn't it be enough to just change a line in the OMVFilesystemBackendZFS class in OMVStorageZvol.php from <code class="inlineCode">$this-&gt;properties = self::PROP_NONE;</code> to <code class="inlineCode">$this-&gt;properties = self::PROP_POSIX_ACL;</code>?

      This is equal to return true. I just wanted to be sure. But this would enable acl support for zfs in general, but it has to be enabled for each zfs pool/dataset explicitly. This is ok for me, because I know that. Others might not.
    • Omvii wrote:

      nicjo814 wrote:

      Now I might be completely wrong, but wouldn't it be enough to just change a line in the OMVFilesystemBackendZFS class in OMVStorageZvol.php from <code class="inlineCode">$this-&gt;properties = self::PROP_NONE;</code> to <code class="inlineCode">$this-&gt;properties = self::PROP_POSIX_ACL;</code>?

      This is equal to return true. I just wanted to be sure. But this would enable acl support for zfs in general, but it has to be enabled for each zfs pool/dataset explicitly. This is ok for me, because I know that. Others might not.

      I've updated the plugin in the testing repo now to version 0.6.4.3 to enable Posix ACL. Also I found this regarding inheritance of ACLs: ​[url]https://fearedbliss.word…ls-on-zfs-on-linux-0-6-3/[/url]