On Mon, 04.08.14 18:13, Marcin Juszkiewicz (mjuszkiew...@redhat.com) wrote:

> Can someone point me to discussion which ended in /media being symlink
> to /run/media directory?
> 
> I am now looking at Picasa rescanning 40GB of pictures just because
> /media/storage/ dissapeared after upgrade of packages (which moved
> /media/ to /media.rpmmoved/ one).
> 
> Should I create /my-own-directory-do-not-even-think-about-touching-it/
> and keep mountpoints of all hard drives there just to hope that it will
> stay there for next year?

Yes, you should.

/media was supposed to be the place where removable media is
automatically mounted. There are no rules on how things are named for
it, not whether the directory names are stable in any way. hal and
udisks used to mount stuff there, but they haven't done that since quite
a while now, since removable media should be private to the user, and a
system-wide namespace is inappropriate for that really. Thus it moved to
a user-private directory in /run/media/$USER/ instead, which nobody but
the user who is active on the seat the media was inserted to has access
to. This fixes a number of security problems since the namespace is
now private to the user, and a rogue user cannot confuse another user's
apps by taking possession of the /media path where they'd expect a
device to show up...

Now, while /run/media (and formerly /media) are under strictly automatic
control by udisks, the directory hierarchy /mnt is supposed to be under
admin control. If you want to mount arbitrary stuff to fixed places
following your own naming scheme, that's where you are supposed to mount
your stuff. If you want your removable media device to show up there,
simply edit /etc/fstab and add a line of your choice.

To make this more confusing, to my knowledge Ubuntu (or is it Debian as
its upstream?) actually patches /run/media/$UID back into /media. Or at
least I did that. It's stupid, and a security hole, and they should stop
doing that, but they know better...

The /media directory should probably be dropped from FHS, as it it's
really pointless, and is nothing one would ever use today. In fact, our
filesystem.rpm package should really stop shipping that (but then again,
I mean, it also ships /var/gopher, ...)

Lennart

-- 
Lennart Poettering, Red Hat
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to