Hello,
i'm using zfs dataset with jails and i meet some troubles with permissions issue:
One of my jails is used for mariadb and is built on 3 datasets automatically mounted at boot:
The trouble is that within the jail, the user mysql can't write in the directories:
- /jails/db/var/db/mysql/data
- /jails/db/var/db/mysql/log
The permissions for those directories are:
I put here the result of getfacl in the jail:
The config for the jail is:
My rc.conf in the jail:
The /etc/sysctl.conf in the Host:
i'm running: 13.1-RELEASE-p5 FreeBSD 13.1-RELEASE-p5 releng/13.1-n250174-753d65a19a55
I'm missing something but i can't see what it is...
Any hints ?
Thanks a lot for your help
Edit: just added the getfacl results

i'm using zfs dataset with jails and i meet some troubles with permissions issue:
One of my jails is used for mariadb and is built on 3 datasets automatically mounted at boot:
Bash:
# mount | grep db
zroot/jails/db on /jails/db (zfs, local, noatime, nfsv4acls)
zroot/jails/db/data on /jails/db/var/db/mysql/data (zfs, local, noatime, nfsv4acls)
zroot/jails/db/log on /jails/db/var/db/mysql/log (zfs, local, noatime, nfsv4acls)
devfs on /jails/db/dev (devfs)
The trouble is that within the jail, the user mysql can't write in the directories:
- /jails/db/var/db/mysql/data
- /jails/db/var/db/mysql/log
The permissions for those directories are:
Bash:
# ls -l /var/db/mysql
drwxr-xr-x 2 mysql mysql 2 Apr 13 12:28 data/
drwxr-xr-x 2 mysql mysql 2 Apr 5 10:31 log/
I put here the result of getfacl in the jail:
Bash:
dervishe@db:/var/db# getfacl -v /var/db/mysql/data/
# file: /var/db/mysql/data/
# owner: mysql
# group: mysql
owner@:read_data/write_data/execute/append_data/read_attributes/write_attributes/read_xattr/write_xattr/read_acl/write_acl/write_owner/synchronize::allow
group@:read_data/execute/read_attributes/read_xattr/read_acl/synchronize::allow
everyone@:read_data/execute/read_attributes/read_xattr/read_acl/synchronize::allow
dervishe@db:/var/db# getfacl -v /var/db/mysql/log
# file: /var/db/mysql/log
# owner: mysql
# group: mysql
owner@:read_data/write_data/execute/append_data/read_attributes/write_attributes/read_xattr/write_xattr/read_acl/write_acl/write_owner/synchronize::allow
group@:read_data/execute/read_attributes/read_xattr/read_acl/synchronize::allow
everyone@:read_data/execute/read_attributes/read_xattr/read_acl/synchronize::allow
The config for the jail is:
Bash:
db {
host.hostname = db;
/*Just network stuff here*/
}
Code:
db:/var/db/mysql# cat /etc/rc.conf
mysql_enable="YES"
mysql_dbdir=/var/db/mysql/data
Bash:
# cat /etc/sysctl.conf
#security.bsd.see_other_uids=0
security.bsd.see_other_uids=0
security.bsd.see_other_gids=0
security.bsd.see_jail_proc=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
kern.randompid=1
vfs.zfs.min_auto_ashift=12
hw.spec_store_bypass_disable=2
hw.ibrs_disable=0
I'm missing something but i can't see what it is...
Any hints ?
Thanks a lot for your help

Edit: just added the getfacl results
