[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ezjail and zfs in FreeBSD>=9.1




I am running ezjail 3.3 on FreeBSD 10.0-RELEASE-p3, and I had this same issue, the fix below worked well for me….

See also:  The FreeBSD Forums • View topic - Mounting ZFS Filesystem in Jail "Insufficient privileges”

Alexander Pyhalov wrote:

It seems that ezjail 3.3 doesn't set allow.mount allow.mount.zfs when delegates zfs fs to a jail.
Changing

# Attach ZFS-datasets to the jail
for zfs in ${ezjail_zfs_datasets}; do
/sbin/zfs jail ${ezjail_id} ${zfs} || echo -n "Error: ${zfs} could not be configured"
done

to

# Attach ZFS-datasets to the jail
[ -z "${ezjail_zfs_datasets}" ] || /usr/sbin/jail -m jid=${ezjail_id} allow.mount allow.mount.zfs
for zfs in ${ezjail_zfs_datasets}; do
/sbin/zfs jail ${ezjail_id} ${zfs} || echo -n "Error: ${zfs} could not be configured"
done

in /usr/local/etc/rc.d/ezjail

solves the issue for me.