this post was submitted on 18 Aug 2023
0 points (NaN% liked)

Linux

48009 readers
802 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm on Manjaro Linux with Gnome. When I attach a USB HDD to my laptop, it mounts as /run/media/username/uuid. But for some reason, it is mounted as root and not with the owner set to the currently logged in user. For that reason, I can't create new directory's on this HDD, after I attached this to the laptop.

I can only switch to root, create the folder and change ownership of this new folder to the currently logged in user.

Is there any way to automount the USB hdd/stick with ownership of the currently logged in user?

you are viewing a single comment's thread
view the rest of the comments
[–] SomeBoyo@feddit.de 0 points 1 year ago* (last edited 1 year ago) (2 children)

sudo chown -R username:group /path/to/the/drive/

You should now be able to create folders and mount it normally

[–] db2@sopuli.xyz 0 points 1 year ago (1 children)

Or add the uuid to fstab so it's mounted as owned by their uid.

[–] laskobar@feddit.de 0 points 1 year ago

Is there some variable to use as placeholder for the current logged in user, or do I have to use one gid/uid for all users on the laptop?