Automount USB HDD ownership

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?

Frederic,

I think this policy trick mxlinux.org/…/mount-internal-partition-without-us… at least on Debian it works

SomeBoyo, (edited )

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

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

db2,

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

laskobar,

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?

db2,

It’s a good use case for groups, mounted as that group and the users who need it being in that group.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines