Re: A user cannot remove his readonly snapshots?!

2017-09-18 Thread Austin S. Hemmelgarn
On 2017-09-16 10:28, Ulli Horlacher wrote: On Sat 2017-09-16 (13:47), Kai Krakow wrote: Or you do "btrfs device stats .", it shows the associated device(s). tux@xerus:/test/tux/zz: btrfs device stats . ERROR: getting dev info for devstats failed: Operation not permitted Not possible for a

Re: A user cannot remove his readonly snapshots?!

2017-09-18 Thread Austin S. Hemmelgarn
On 2017-09-15 15:32, Ulli Horlacher wrote: On Fri 2017-09-15 (13:08), Austin S. Hemmelgarn wrote: On 2017-09-15 12:37, Ulli Horlacher wrote: I have my btrfs filesystem mounted with option user_subvol_rm_allowed tux@xerus: btrfs subvolume delete /test/tux/zz/.snapshot/2017-09-15_1824.test

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Ulli Horlacher
On Sat 2017-09-16 (13:47), Kai Krakow wrote: > Or you do "btrfs device stats .", it shows the associated device(s). tux@xerus:/test/tux/zz: btrfs device stats . ERROR: getting dev info for devstats failed: Operation not permitted Not possible for a normal user. -- Ullrich Horlacher

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Kai Krakow
Am Sat, 16 Sep 2017 09:36:33 +0200 schrieb Ulli Horlacher : > On Sat 2017-09-16 (01:22), Kai Krakow wrote: > > > > tux@xerus:/test/tux/zz/.snapshot: btrfs subvolume delete > > > 2017-09-15_1859.test Delete subvolume (no-commit): > > >

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Marat Khalili
On 16/09/17 13:19, Ulli Horlacher wrote: How do I know the btrfs filesystem for a given subvolume? Do I really have to manually test the diretory path upwards? It was discussed recently: the answer is, unfortunately, yes, until someone patches df to do it for us. You can do it more or less

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Ulli Horlacher
On Sat 2017-09-16 (10:10), Goffredo Baroncelli wrote: > On 09/15/2017 06:37 PM, Ulli Horlacher wrote: > > I have my btrfs filesystem mounted with option user_subvol_rm_allowed > > You should change the "ro" property to false before deleting it > > btrfs property set

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Ulli Horlacher
On Sat 2017-09-16 (11:04), Goffredo Baroncelli wrote: > 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. > or to relax the check around "btrfs sub del", so an user can

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Peter Grandi
[ ... ] > I can delete normal subvolumes but not the readonly snapshots: It is because of ordinary permissions for both subvolumes and snapshots: tree$ btrfs sub create /fs/sda7/sub Create subvolume '/fs/sda7/sub' tree$ chmod a-w /fs/sda7/sub tree$ btrfs sub del /fs/sda7/sub

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Goffredo Baroncelli
On 09/16/2017 01:22 AM, Kai Krakow wrote: > Am Sat, 16 Sep 2017 00:02:01 +0200 > schrieb Ulli Horlacher : > >> 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

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Ulli Horlacher
On Sat 2017-09-16 (10:10), Goffredo Baroncelli wrote: > > tux@xerus: btrfs subvolume snapshot -r /test/tux/zz > > /test/tux/zz/.snapshot/2017-09-15_1824.test > > tux@xerus: btrfs subvolume delete > > /test/tux/zz/.snapshot/2017-09-15_1824.test > > Delete subvolume (no-commit):

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Goffredo Baroncelli
On 09/15/2017 06:37 PM, Ulli Horlacher wrote: > I have my btrfs filesystem mounted with option user_subvol_rm_allowed > > tux@xerus: btrfs --version > btrfs-progs v4.4 > > tux@xerus: uname -a > Linux xerus 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 > x86_64 x86_64 x86_64

Re: A user cannot remove his readonly snapshots?!

2017-09-16 Thread Ulli Horlacher
On Sat 2017-09-16 (01:22), Kai Krakow wrote: > > tux@xerus:/test/tux/zz/.snapshot: btrfs subvolume delete > > 2017-09-15_1859.test Delete subvolume (no-commit): > > '/test/tux/zz/.snapshot/2017-09-15_1859.test' ERROR: cannot delete > > '/test/tux/zz/.snapshot/2017-09-15_1859.test': Read-only file

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Kai Krakow
Am Sat, 16 Sep 2017 00:02:01 +0200 schrieb Ulli Horlacher : > On Fri 2017-09-15 (23:44), Ulli Horlacher wrote: > > On Fri 2017-09-15 (22:07), Peter Grandi wrote: > > > [...] > > > > > > Ordinary permissions still apply both to 'create' and 'delete': > > >

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Ulli Horlacher
On Fri 2017-09-15 (23:44), Ulli Horlacher wrote: > On Fri 2017-09-15 (22:07), Peter Grandi wrote: > > > > [ ... ] mounted with option user_subvol_rm_allowed [ ... ] > > > root can delete this snapshot, but not the user. Why? [ ... ] > > > > Ordinary permissions still apply both to 'create' and

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Ulli Horlacher
On Fri 2017-09-15 (22:07), Peter Grandi wrote: > > [ ... ] mounted with option user_subvol_rm_allowed [ ... ] > > root can delete this snapshot, but not the user. Why? [ ... ] > > Ordinary permissions still apply both to 'create' and 'delete': My user tux is the owner of the snapshot directory,

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Peter Grandi
> [ ... ] mounted with option user_subvol_rm_allowed [ ... ] > root can delete this snapshot, but not the user. Why? [ ... ] Ordinary permissions still apply both to 'create' and 'delete': tree$ sudo mkdir /fs/sda7/dir tree$ btrfs sub create /fs/sda7/dir/sub ERROR: cannot access

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Ulli Horlacher
On Fri 2017-09-15 (13:08), Austin S. Hemmelgarn wrote: > On 2017-09-15 12:37, Ulli Horlacher wrote: > > > I have my btrfs filesystem mounted with option user_subvol_rm_allowed > > tux@xerus: btrfs subvolume delete > > /test/tux/zz/.snapshot/2017-09-15_1824.test > > Delete subvolume (no-commit):

Re: A user cannot remove his readonly snapshots?!

2017-09-15 Thread Austin S. Hemmelgarn
On 2017-09-15 12:37, Ulli Horlacher wrote: I have my btrfs filesystem mounted with option user_subvol_rm_allowed tux@xerus: btrfs --version btrfs-progs v4.4 tux@xerus: uname -a Linux xerus 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux tux@xerus:

A user cannot remove his readonly snapshots?!

2017-09-15 Thread Ulli Horlacher
I have my btrfs filesystem mounted with option user_subvol_rm_allowed tux@xerus: btrfs --version btrfs-progs v4.4 tux@xerus: uname -a Linux xerus 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux tux@xerus: id uid=1000(tux) gid=100(users)