Yes, you can do that.
They are stored in a file for each share, you can access (ls
) and modify (chmod
) this file at the locations (assuming direct mount mapping)
/<pool>/<filesystem>/.zfs/shares/<share>
where <pool>
and <filesystem>
is the mounted path of your ZFS file system, and <share>
is the name of your CIFS share. Example:
FS: pool0/users/bob
Path: /pool0/users/bob/.zfs/shares/bobs_home
But be careful: the share permissions can only be set for the whole share, no sub-divisions are possible. Additionally, all file ACLs are still valid and will be evaluated. Think of it as another gate - once you are through the "share" security gate, you must still pass the "file" security gate to finally get access.
It depends on your goals:
If you want to give different users a fixed set of permissions at different times, your case may be better served by using groups instead of users in the file ACLs. You add or remove a user from a group and he immediately gains or loses access from all files where the group has been set. Of course, sometimes you still have to remove or add a group itself, but it will most likely be not that frequent. You retain all granularity.
If you want to have different "views" on the data without changing the files at all, even at the same time, share permissions might be what you want. You can create one or multiple shares (each with different share ACLs and names, referencing the same dataset) and quickly allow/deny users or groups to access what's behind. If users can also login locally, they can of curse circumvent these permissions.