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

    • Offizieller Beitrag

    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

  • 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):



    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).

  • 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 $this->properties = self::PROP_NONE; to $this->properties = self::PROP_POSIX_ACL;?

  • 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.


  • 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: http://https://fearedbliss.wordpress.…n-zfs-on-linux-0-6-3/</a>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!