ZFS Folder Permissions

Hi,

I am trying to set up a folder for sharing files between a number of users. If I was using normal UNIX permissions I would set it to 770, and make sure that all of the users are in the same group.

However, as I am using ZFS the directories have NFSv4 ACLs. Most of the time things work fine, but then for some reason the permissions get screwed up.

I am using Samba and Netatalk to share these directories with the users.

This is the permissions on the root directory of the folder:

Code:
% getfacl ./

# file: ./
# owner: khaine
# group: staff
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
        everyone@:r-x---a-R-c--s:-------:allow

Samba Configuration:

Code:
[global]

workgroup = UNIVERSITAS
server string = Samba Server Version %v
netbios name = Opis
wins support = yes

encrypt passwords = true
map to guest = bad user
security = user
passdb backend = tdbsam
server signing = mandatory
min protocol = SMB2

valid users = @smbusers, khaine

read only = no
inherit permissions = No
inherit acls = No
inherit owner = No
force unknown acl user = No
store dos attributes = yes
store dos attributes = yes
map read only = no
ea support = yes


#based on [URL]https://www.mankier.com/8/vfs_fruit[/URL]
vfs objects  = zfsacl,fruit,catia
nfs4:mode    = special     
nfs4:acedup  = merge       
nfs4:chown   = yes

fruit:resource = xattr
fruit:metadata = netatalk
fruit:locking = netatalk

[Media]
path = /media/
writable  = yes
browsable = yes
read only = no

Does anyone know what I need to do to make sure the permissions remain correct and ensure that all users can edit the files in the shared directory and sub-directories.

For example, As a regular user I can't cd into some of the sub directories in /usr/ports, however other directories I can.

Code:
$/usr/ports/net % cd samba46
samba46: Permission denied.

These are the permissions on samba46

Code:
 % getfacl ./samba46

# file: ./samba46
# owner: root
# group: wheel
            owner@:rwxp--aARWcCos:-------:allow
            group@:------a-R-c--s:-------:allow
        everyone@:------a-R-c--s:-------:allow
 
However, as I am using ZFS the directories have NFSv4 ACLs. Most of the time things work fine, but then for some reason the permissions get screwed up.

I am using Samba and Netatalk to share these directories with the users.

Might it have something to do with ZFS ACL inheritance?
[D]on't forget about the ZFS options "aclmode" and "aclinherit" and how they affect inherited permissions. You probably want to set "aclmode=passthrough" and "aclinherit=passthrough" on root of the share.
 
I'm pretty sure I set those options when I set up the server. I'll reset those configurations and see if that fixes it
 
Back
Top