What privileges are needed to delete a read-only btrfs subvolume

btrfspermissionssnapshot

I want to delegate non-root user to delete read-only subvolumes (snapshots).

What exactly capabilities/rights I need to grant, so that he can remove his own read-only snapshots?

I've already mounted the btrfs with -o user_subvol_rm_allowed so users can remove read/write snapshots.

I need it to augment otherwise brillant SnapBtr.py, so non-root users can operate it.

Best Answer

A user can not delete readonly snapshots directly, but he can make them writeable first and then delete them. For this you need to use the btrfs property command:

btrfs property set -ts /path/to/snapshot ro false

If the user is the owner of the snapshot, this should make it writeable and therefore deletable.

Related Question