All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug#998840: Strange warning when deleting subvolume as non-root user
@ 2021-11-09  2:52 Adam Borowski
  2021-11-09 10:30 ` Nikolay Borisov
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Borowski @ 2021-11-09  2:52 UTC (permalink / raw)
  To: linux-btrfs

----- Forwarded message from Boris Kolpackov <boris@codesynthesis.com> -----
Date: Mon, 8 Nov 2021 16:01:53 +0200
From: Boris Kolpackov <boris@codesynthesis.com>
Subject: Bug#998840: Strange warning when deleting subvolume as non-root user

Package: btrfs-progs
Version: 5.14.1-1

After upgrading from btrfs-progs 5.7-1 with Linux kernel 5.7.6 to
btrfs-progs 5.14.1-1 with Linux kernel 5.14.9-2 (from current testing)
I see the following strange new warning when deleting the subvolume as
non-root user (the filesystem is mounted with user_subvol_rm_allowed):

WARNING: cannot read default subvolume id: Operation not permitted

The subvolume deletion succeeds.

To reproduce, mount a btrfs filesystem with user_subvol_rm_allowed,
say, on /mnt and then (assuming non-root user is called nonroot):

# chown nonroot:nonroot /mnt
# su - nonroot
$ cd /mnt
$ btrfs subvol create test
Create subvolume './test'
$ btrfs subvol delete test
WARNING: cannot read default subvolume id: Operation not permitted
Delete subvolume (no-commit): '/mnt/test'

Any idea what's going on here and how to get rid of this warning?
It adds quite a bit of noise to our logs.


----- End forwarded message -----


Reproduces for me both on 5.14 kernel+progs and 5.15.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Vat kind uf sufficiently advanced technology iz dis!?
⢿⡄⠘⠷⠚⠋⠀                                 -- Genghis Ht'rok'din
⠈⠳⣄⠀⠀⠀⠀

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug#998840: Strange warning when deleting subvolume as non-root user
  2021-11-09  2:52 Bug#998840: Strange warning when deleting subvolume as non-root user Adam Borowski
@ 2021-11-09 10:30 ` Nikolay Borisov
  0 siblings, 0 replies; 2+ messages in thread
From: Nikolay Borisov @ 2021-11-09 10:30 UTC (permalink / raw)
  To: Adam Borowski, linux-btrfs



On 9.11.21 г. 4:52, Adam Borowski wrote:
> ----- Forwarded message from Boris Kolpackov <boris@codesynthesis.com> -----
> Date: Mon, 8 Nov 2021 16:01:53 +0200
> From: Boris Kolpackov <boris@codesynthesis.com>
> Subject: Bug#998840: Strange warning when deleting subvolume as non-root user
> 
> Package: btrfs-progs
> Version: 5.14.1-1
> 
> After upgrading from btrfs-progs 5.7-1 with Linux kernel 5.7.6 to
> btrfs-progs 5.14.1-1 with Linux kernel 5.14.9-2 (from current testing)
> I see the following strange new warning when deleting the subvolume as
> non-root user (the filesystem is mounted with user_subvol_rm_allowed):
> 
> WARNING: cannot read default subvolume id: Operation not permitted
> 
> The subvolume deletion succeeds.
> 
> To reproduce, mount a btrfs filesystem with user_subvol_rm_allowed,
> say, on /mnt and then (assuming non-root user is called nonroot):
> 
> # chown nonroot:nonroot /mnt
> # su - nonroot
> $ cd /mnt
> $ btrfs subvol create test
> Create subvolume './test'
> $ btrfs subvol delete test
> WARNING: cannot read default subvolume id: Operation not permitted
> Delete subvolume (no-commit): '/mnt/test'
> 
> Any idea what's going on here and how to get rid of this warning?
> It adds quite a bit of noise to our logs.


This error is printed because btrfs-progs checks whether the volume
being deleted is the default since this is not allowed. To perform this
check we rely on the TREE_SEARCH ioctl which requires the user having
CAP_SYS_ADMIN capability.


> 
> 
> ----- End forwarded message -----
> 
> 
> Reproduces for me both on 5.14 kernel+progs and 5.15.
> 
> 
> Meow!
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-09 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  2:52 Bug#998840: Strange warning when deleting subvolume as non-root user Adam Borowski
2021-11-09 10:30 ` Nikolay Borisov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.