65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
|
What filesystem-media does?
|
||
|
|
||
|
It brings /media directory back to you!
|
||
|
|
||
|
|
||
|
Why you need filesystem-media?
|
||
|
|
||
|
Filesystem Hierarchy Standard defines /media as a directory for removable
|
||
|
media. After introduction of udisks, this directory was abandoned in
|
||
|
favor of separated user specific directories. It is more secure, but path
|
||
|
/run/media/{user} is uncomfortable for console use.
|
||
|
|
||
|
filesystem-media brings /media back as a polyinstantiated directory. It
|
||
|
means that its contents is a private and user specific bind mount to a
|
||
|
particular /run/media/{user}.
|
||
|
|
||
|
It uses pam_namespace PAM module to provide proper initialization.
|
||
|
|
||
|
|
||
|
How filesystem-media works?
|
||
|
|
||
|
Your /run/media/{user} directory is made accessible in your /media
|
||
|
directory as well. But it is not a standard symlink or bind mount. It is
|
||
|
a private bind mount! Your contents of /media directory is not visible by
|
||
|
other users. They see their own /media directory.
|
||
|
|
||
|
To get it working, you need to re-login after the installation.
|
||
|
|
||
|
|
||
|
Side effects of filesystem-media
|
||
|
|
||
|
1. With filesystem-media, medium is mounted twice. It causes problems
|
||
|
with a (not recommended) way to unmount devices mounted by udisks:
|
||
|
|
||
|
umount /run/media/{user}/{medium}
|
||
|
|
||
|
udisks fails to delete no more used mountpoint. You need to unmount
|
||
|
the volume from /media first. Use the recommended way, and no problem
|
||
|
occurs:
|
||
|
|
||
|
udisksctl unmount -b {device}
|
||
|
|
||
|
2. Directory permission required by udisks are incompatible with
|
||
|
permissions required by pam_namespace. As the current pam_namespace
|
||
|
does not support per-mount parent_mode or parent_create,
|
||
|
filesystem-media needs to set ignore_instance_parent_mode globally.
|
||
|
Somebody could considered it as a security risk.
|
||
|
|
||
|
|
||
|
To do
|
||
|
|
||
|
Integration of polyinstantiated /media directly to udisks would be better
|
||
|
than filesystem-media.
|
||
|
|
||
|
|
||
|
Author
|
||
|
|
||
|
filesystem-media was written by Stanislav Brabec <sbrabec@suse.cz>
|
||
|
|
||
|
|
||
|
License
|
||
|
|
||
|
filesystem-media a public domain software licensed under the Creative
|
||
|
Commons Zero v1.0 Universal.
|