Hazard's stuff

03 Feb, 2014

Fix for Fedora USB disks going into /run/media/[user]

— Posted by hazard @ 03-02-2014 00:27
As part of systemd/DBus revolution, newer Fedoras have this annoying feature that all USB disks get mounted into to /run/media/[user]/[diskname] (also /var/run/media, which is a symlink).

After some digging, I found that this is done supposedly for security reasons and being taken care of by udisks2 daemon. I'm still not sure what extra security this gives since 99% of Fedora desktops are not accessed by untrusted users, while admins of untrusted multiuser machines usually understand the risks. Nevermind. What I'm sure though, is that it breaks guest access to USB disks from Samba and breakes old scripts which were using /media.

To return old behavior back and make udisks2 change mount point to /media, create a file /etc/udev/rules.d99-usb-shared-media.rules:


udev should notice and read this file automatically. After this, just unplug and plug your USB drive back to see it in good old /media.


Hazard's stuff is maintained by Vladimir Ivashchenko <hazard -at- hazardous-area.org>
This blog is powered by pLog