Bug 1213838 - BTRFS utils not able to list or delete subvolumes of external drives
Summary: BTRFS utils not able to list or delete subvolumes of external drives
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Aeon
Classification: openSUSE
Component: Distrobox (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Richard Brown
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-01 05:50 UTC by Stephan Schindel
Modified: 2023-08-01 08:19 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Schindel 2023-08-01 05:50:19 UTC
I have an external drive attached to the OS, it looks like this from the Tumbleweed distrobox:



stephan@tumbleweed:~> mount | grep SEAGATE-5QM2PNLQ
/dev/mapper/luks-699dbae3-5236-4238-b947-03e6dc6dee3e on /run/host/run/media/stephan/SEAGATE-5QM2PNLQ type btrfs (rw,nosuid,nodev,relatime,seclabel,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/luks-699dbae3-5236-4238-b947-03e6dc6dee3e on /home/stephan/.local/share/containers/storage/overlay/6248c4c74fbbca45d5ba85d2aa118708af9da2ad8cca0ab755f55f877c63042a/merged/run/host/run/media/stephan/SEAGATE-5QM2PNLQ type btrfs (rw,nosuid,nodev,relatime,seclabel,space_cache=v2,subvolid=5,subvol=/)
/dev/mapper/luks-699dbae3-5236-4238-b947-03e6dc6dee3e on /run/media/stephan/SEAGATE-5QM2PNLQ type btrfs (rw,nosuid,nodev,relatime,seclabel,space_cache=v2,subvolid=5,subvol=/)




I can access all files and folders from withing the distrobox. Creating BTRFS subvolumes work fine, however listing and deleting does not work (no permissions):

stephan@tumbleweed:~> sudo btrfs subvol list /run/media/stephan/SEAGATE-5QM2PNLQ/
ERROR: cannot access '/run/media/stephan/SEAGATE-5QM2PNLQ/': Permission denied
ERROR: can't access '/run/media/stephan/SEAGATE-5QM2PNLQ/'
Comment 1 Richard Brown 2023-08-01 08:19:17 UTC
This isn't a bug, but actually a feature

Your default distrobox runs as your user

Your external drive is connected on your host

Sudo in your distrobox doesn't give you root on your host

So in order to get the behaviour you want, either you need to run distrobox --root or run the btrfs tools from the host, not inside a distrobox