You are not logged in.

#1 2015-04-06 19:16:35

sirdle
Member
Registered: 2014-07-18
Posts: 25

What is the purpose of /run/media/myUserName ?

I'm having a frustrating time mounting a usb-connected hard-drive. I think I've got it figured out... but it doesn't make any sense to me.

I used G-Parted, live to:
1. Delete the existing partition
2. Create a new primary partition which fills the available disk space.
3. Install an ext4 file system.

Next I rebooted and then connected my usb drive to my computer.

I'm using PCmanFM as a file manager and Fluxbox as a WM. I'm also using udisk2 and polkit.

The drive was automatically mounted in /run/media/myUserName... but I don't have permission to write to that directory. That seems very odd to me. It seems like the purpose of that directory would be to give the user a place where he could mount and unmount media without having to resort to sudo. So why would the permissions on the directory be root/root?

I was able to solve the problem by changing the directory ownership to user/user... but I'm wondering if I'm doing seriously something wrong. In other words, I'm wondering if the purpose of that directory is something totally different and I shouldn't be monkeying around with the permissions? Or if perhaps I should be creating a policy rule allowing the user to access that directory?

Also, /run/media/myUserName has a folder in it called "Lost & Found". This suggests to me that I did something wrong while formatting  the drive and creating the file system...

A nudge in the right direction would be greatly appreciated.

Cheers,
sirdle

Offline

#2 2015-04-06 19:26:39

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: What is the purpose of /run/media/myUserName ?

Media should be mounted to /run/media/<yourUserName>/<something> where <something> is ideally the filesystem label. If your device is really mounting to /run/media/<yourUserName> then I think something is going wrong. However, the automounting is only compounding your confusion. You seem to lack a fundamental understanding of ext filesystems; otherwise, the ownership issue and the lost+found folder wouldn't perplex you.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-04-06 19:28:14

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 753

Re: What is the purpose of /run/media/myUserName ?

udisks2 uses that location instead of /media, like udisks did. No, there's nothing special about it, it's just a mountpoint. (/run is cleared on reboot along with all lefovers,)
Check this if you want the old behaviour: https://wiki.archlinux.org/index.php/Ud … udisks2.29

Lost&Found should exist on any ext file system (it's usually hidden).

EDIT: alphaniner was a bit quicker.

Last edited by Xabre (2015-04-06 19:29:08)

Offline

#4 2015-04-07 19:19:36

tobyjwebb
Member
Registered: 2012-09-18
Posts: 3

Re: What is the purpose of /run/media/myUserName ?

The permission problem is that you haven't set the permissions inside the ext4 filesystem yet, it's nothing to worry about.

If it were formatted as a Windows partition, as Windows doesn't have the same type of permission functionality, it would make everything read/writable to the person who mounted the partition. As it's a Linux one, you'll have to use:

sudo chown <myUser>.<myGroup> /run/media/<myUser>/<something>

Offline

Board footer

Powered by FluxBB