Which zfs permission(s) is/are needed to change readonly status?
2
votes
1
answer
124
views
zfs get readonly tank/mydata
NAME PROPERTY VALUE SOURCE
tank/mydata readonly off local
zfs set readonly=on tank/mydata
echo $?
0
zfs get readonly tank/mydata
NAME PROPERTY VALUE SOURCE
tank/mydata readonly on local
sudo -u acmeuser zfs set readonly=on tank/mydata
cannot mount 'tank/mydata': Insufficient privileges
property may be set but unable to remount filesystem
echo $?
255
I would like to get this user to be able to run this command. How do I get a zero returned?
Note: I don't actually need to be able to change the readonly state, just for the command to set it to ON when it is already ON to return a zero status rather than 255.
This has to do with a script that executes this command even if readonly already is set to ON which would be difficult to change.
Note that:
zfs allow tank/mydata
returns both the
mount
and the readonly
permissions. Which others are necessary?
Asked by npr_se
(43 rep)
Mar 24, 2025, 02:22 PM
Last activity: May 24, 2025, 01:03 AM
Last activity: May 24, 2025, 01:03 AM