On 09/16/2017 01:22 AM, Kai Krakow wrote: > Am Sat, 16 Sep 2017 00:02:01 +0200 > schrieb Ulli Horlacher <frams...@rus.uni-stuttgart.de>: > >> On Fri 2017-09-15 (23:44), Ulli Horlacher wrote: [...] > > See "man mount" in section btrfs mount options: There is a mount option > to allow normal user to delete snapshots. But this is said to has > security implication I cannot currently tell. Maybe someone else knows.
"btrfs sub del" removes a subvolume independently by its contents: it doesn't check the subvolume files/directories and their permission/ownership. This is different from a "rm -rf", which (e.g.) can't delete a directory owned by a different user with files ghigo@venice:/tmp$ mkdir d ghigo@venice:/tmp$ mkdir d/d ghigo@venice:/tmp$ touch d/d/f ghigo@venice:/tmp$ sudo chown nobody d/d ghigo@venice:/tmp$ rm -rf d rm: cannot remove 'd/d/f': Permission denied In the past I proposed to allow an ordinary user to remove an *empty* subvolume with a simple rmdir (if he has the permissions). This would solve this kind of problem. https://www.spinics.net/lists/linux-btrfs/msg06499.html or to relax the check around "btrfs sub del", so an user can remove an _empty_ subvolume https://www.spinics.net/lists/linux-btrfs/msg06522.html > > BR G.Baroncelli -- gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it> Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html