Trying to copy files from a BTRFS partition but need permission/ownership

First, thank you so much for your time and patience. Newish to Linux and the terminal still, here is the issue I have, Windows busted my Manjaro install for the last time so I’m going full Linux this time but need my 43GB Windows libvirt image back and some other files.
The partition is Btrfs — Mounted at /run/media/USER/root
Already did a sudo chown $USER:$USER /run/media/USER/root as told by a similar solution in these fine forum but I still see a lock in the terminal and I’m unable to copy my files like /run/media/replica/root/@/var/lib/libvirt
What can I do now?

Again thank you for the time and effort to help for such a trivial matter, anyways have a wonderful day!

  1. New user’s should not use BTRFS. New user’s should use EXT4 Partitions.

  2. Btrfs is a Filesystem for Linux Veterans and for people who is open to learn the latest little detail, because you can run into deep problems if you don’t know what are you doing.

  3. At the end of the day its your choice… just choose wisely :wink:

Edit:
If you still looking for help, i recommend to post your system Info’s (as code).

inxi --admin --verbosity=5 --filter --no-host --width
1 Like

it should be

sudo chown $USER:$USER /run/media/$USER/root

2 Likes

/run is not a good choice for this - create a directory under /mnt for example
/run is a temporary directory and permission changes (or any other changes) will not stick, will not survive a reboot

first change the permission of the mount point - then mount the device to it
not the other way around

if you are root, permissions do not matter - you can just copy from wherever to wherever and worry about permissions later

ps:
and, what I just noticed:

That is normal - you as a regular user do not have permission to read many of the files/directories in there, perhaps can not even open the directory /var/lib/libvirt itself
That has got nothing to do with the permission of the mount point.
Do your copying as root, then permissions won’t matter.



it remains that
BTRFS is an enigma wrapped in a mystery to me …

2 Likes

↑ This ↑

… and the fact that the directory, at least, if mounted in /run/media should already be “owned” by $USER.

What I’d do:

  • Create a mountpoint in your /home e.g. mkdir ~/testmount
  • Mount your partition there
  • Take ownership recursively e.g.:
    sudo chown -R $USER:$USER testmount

… but before doing any of this, take heed of the comments above about btrfs. I have zero experience with this; use my suggestions at your own risk.

1 Like

Can you spot your mistake? :stuck_out_tongue: (And no, it doesn’t have anything to so with btrfs. :wink:)

Clue

~/.testmount is not the same thing as ~/testmount.

:wink:


Please read… :point_down:

:wink:

1 Like

OOPS habit when I deal with stuff in /home: it’s practically all I use it for! (config files).

Edited accordingly. :wink:

1 Like

Thanks for the comment. BTRFS ain’t that hard. Quite the experience and the instant snapshots and even accessible from GRUB are worth it imho.

By newish I mean I don’t have experience in Linux being broke. It usually always is Windows breaking my dualboot and apps being obfuscated for WINE so I lack experience in fixing some things because Linux usually works or someone already fixed it.

@varikonniemi Thanks a lot! I actually got it wrong from the forums :upside_down_face: but can’t reply a dead thread.

@Nachlese That did the trick as well as fixing the problem between the keyboard and the seat… for some reason I could not access the files because nautilus was ‘keeping the volume busy’ but restarting the system solved everything. Thank you so much for the help!

@BG405 Will do next time :wink:

@Aragorn Yeah. Unfortunately that was the syntax error from elsewhere :slightly_frowning_face: Thanks for the tutorial :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.