# more destruction of usability

## curmudgeon

I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.

First question - can someone explain any purported benefits of this?

Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.

Thank you in advance for your help.

----------

## Logicien

Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory.

----------

## The Doctor

 *Quote:*   

> First question - can someone explain any purported benefits of this? 

 

Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.

The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.

----------

## i92guboj

 *The Doctor wrote:*   

>  *Quote:*   First question - can someone explain any purported benefits of this?  
> 
> Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
> 
> 

 

For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd. But...   :Rolling Eyes: 

----------

## Anon-E-moose

 *The Doctor wrote:*   

>  *Quote:*   First question - can someone explain any purported benefits of this?  
> 
> Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
> 
> The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.

 

Makes me glad that I don't run or even have udisks* installed. 

The constant change simply because redhat wants to do it a form of insanity.

 *i92guboj wrote:*   

> For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd

 

I keep /mnt as a hard mount point, though I do symbolic link /media to it. 

Been that way for years.

----------

## i92guboj

I understand the fstab vs. removable media stuff. But, taking into consideration that the new system is broken anyway, and that you need to tinker with files in /etc related to *kit* *dev* foobarmoocow, there's really no point in separating them.

Previously you needed to be root to mount drives. Now you need to be root to do all that, to kill whatever is locking a given drive at a given moment, and then to be able to format, remove it, etc etc etc. That is, unless you give your user full 777 permissions over /dev/*, which might not be advisable for many reasons.

More and more this is reminding me of a given OS where you sometimes need to reboot to be able to push off a cdrom.   :Laughing: 

----------

## mv

 *i92guboj wrote:*   

> I still wonder what the reason for the move from /mnt to /media is.

 

The FHS explicitly requires /media for filesystems from removable media (suggesting floppy, cdrom, cdrecorder, zip as subdirectories) while /mnt is for "temporarily mounted filesystems" (being a bit vague what that means, but apparently not removable media).

Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons.

----------

## curmudgeon

 *Logicien wrote:*   

> Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory.

 

How to do that is not clear at all. Looking at the directory structure (at least on my systems), /run/ is a real directory and /var/run/ (which appears in the PRUNEPATHS variable in /etc/updatedb.conf) is symlinked to it.

It seems to me that anything under /run/ (/var/run/) is going to get skipped, whether linked somewhere else or not.

It MIGHT work if there were an "exclude" option (like rsync has), since I want to skip everything in /run/ (which I can't even specify completely in advance) EXCEPT for /run/media/.

 *The Doctor wrote:*   

> The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.

 

Very helpful (and especially noteworthy that Ubuntu "got it right" - in my opinion). Probably faster for me to search the tarball and patch it myself rather than running down their patch. Thanks.

 *mv wrote:*   

> Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons.

 

I can certainly live with /media/user/ (even though it is a bit more typing :) ), which is what Ubuntu went with according to the link posted by The Doctor above (and what I will probably end up going with). There is some point to keeping user separation, even though I would guess that well over ninety percent of mounting removable media is effectively in a single user environment). But putting removable media in /run/ just seems so wrong on so many levels.

The biggest reason I use gentoo is that it is (relatively) easy to fix idiocies like this (not just once, but to sort of automate a set of "permanent" patches).

Thanks, all.

----------

## chaseguard

I use uam, not udisk.  My mountpoint has not changed and is easily configured in uam.conf.  If your media is USB, then perhaps uam might work for you?

----------

## mv

 *curmudgeon wrote:*   

> But putting removable media in /run/ just seems so wrong on so many levels.

 

Not necessarily: There are new subdirectories created at runtime which "typically" should not be permenant. So you either you clean up /media at every reboot (which would be a very questionable policy) or you put that data on a ramdisk (which /run is guaranteed to be). Maybe Redhat has a symlink /media -> /run/media in which case they would follow FHS and additionally have "solved" the cleanup problem.

----------

## Roman_Gruber

 *i92guboj wrote:*   

>  *The Doctor wrote:*    *Quote:*   First question - can someone explain any purported benefits of this?  
> 
> Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.
> 
>  
> ...

 

I totally agree

----------

## OldTango

 *curmudgeon wrote:*   

> I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.
> 
> First question - can someone explain any purported benefits of this?
> 
> Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.
> ...

 I think this move sucks as well and won't get into all the problems it has caused me. To simply answer your question YES you can change it back. Create a file in "/etc/udev/rules.d/99-udisks2.rules" that reads

```
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
```

after which your removable media will be mounted @/media/foo

----------

## gerard27

Thanks a lot OldTango!

Works like a charm.

Gerard.

----------

