Post B0yOGS9JMSMBoKPqgC by subnetspider@mastodon.bsd.cafe
(DIR) More posts by subnetspider@mastodon.bsd.cafe
(DIR) Post #B0yOGS9JMSMBoKPqgC by subnetspider@mastodon.bsd.cafe
2025-12-06T13:27:21Z
1 likes, 1 repeats
Hey FreeBSD people :)I have a particular service in one of my (many) jails, which I need to run as root, so it can manage the jailed ZFS datasets properly.To achieve this, I guess editing the rc script in /usr/local/etc/rc.d/ would be the easiest option, but is it the best one?As I don't know if the rc script could get overwritten in the future by pkg update, I would probably edit a copy and create a symbolic link to it.Is this something that you would do as well?
(DIR) Post #B0ylmaw2WpoHGwVHqy by utrenkner@mastodon.green
2025-12-06T17:36:24Z
0 likes, 0 repeats
@subnetspider There may be a completely different solution to your question. Are you aware of zfs delegation? You can fairly granularly allow a non-root user to manage datasets: create and/or delete snapshots, mount datasets etc etc. https://man.freebsd.org/cgi/man.cgi?query=zfs-allow&apropos=0&sektion=0&manpath=FreeBSD+15.0-RELEASE+and+Ports&arch=default&format=html@gumnos
(DIR) Post #B0ylmcWEdkMCBURhuS by subnetspider@mastodon.bsd.cafe
2025-12-06T17:42:26Z
0 likes, 0 repeats
@utrenkner @gumnos I am aware, but I forgot (I even use it for zfs replication). 😩 I'm just a little skeptic if it will actually work, when I read this (from the zfs-allow handbook). 🤔It says "Linux", but does it mean "ZFS on Linux" which FreeBSD now uses, or e.g. "ZFS on Debian"?
(DIR) Post #B0ylmdJVgXlweJV3iK by utrenkner@mastodon.green
2025-12-06T17:50:38Z
1 likes, 1 repeats
@subnetspider The snippet says that certain mount related tasks cannot be delegated in Linux systems because of restrictions in Linux‘ mount command. To me that means that they do work on non Linux systems like FreeBSD, Illumos.I for example use zfs delegation to allow the www user in a jail to rollback a snapshot in order to empty a cache directory (it rolls back to a snapshot of the empty dataset).@gumnos