/mnt mounts should be supported

backlog
zyga

#1

I have a automounted filesystem setup in /etc/fstab and is mounted under /mnt/mountpoint_name, VLC snap fails to read media files in such location.

fstab entry:

/dev/disk/by-uuid/<uuid> /mnt/mountpoint_name auto suid,dev,nofail,x-gvfs-show,x-systemd.device-timeout=1 0 2

AFAICT currently snap only provides interface to removable medias and doesn’t support this configuration.


Call for testing: OBS-Studio snap
#2

UPDATE: The log

filesystem error: cannot open file /mnt/mountpoint_name/somepath/some_file.mkv (No such file or directory)

#3

you can mount your filesystem under /media instead to make ths work though …


#4

The /mnt directory and anything mounted there is not supported yet (as @ogra said, you can try /media which will work and has appropriate interfaces already) but given that /mnt is even older I wonder if we should support /mnt.

CC @jdstrand for opinions, I can make things happen once we have an agreement.


#5

I’m not opposed to creating rules for /mnt, perhaps in another ‘removable-media’-like interface. The mountpoints in /mnt are not well-formed or regular though, so the rules would be:

# Description: Can access temporary mounted filesystems in /mnt
/mnt/ r,
/mnt/** rwk,

Note, the description for this comes from http://www.pathname.com/fhs/pub/fhs-2.3.html#MNTMOUNTPOINTFORATEMPORARILYMOUNT and arguably the requester of this feature is misusing this location since the fstab entry looks like a permanent location. Of course, /mnt is there and users aren’t obliged to adhere to the FHS…

Perhaps the /mnt rules simply belong in removable-media? The mountpoints aren’t necessarily ‘media’ but since /mnt is typically (according to FHS) for ‘temporary mounts’, ‘removable’ does seem to fit.

The question then becomes, where does this stop? Eg, what about /srv? While /srv is supposed to be for data files the system serves (eg, ftp, http, etc), I’ve seen people use /srv as an alternative to /mnt (eg, especially in relation to a backup server and NFS).

@niemeyer - thoughts? It is pretty clear to me we should continue to ignore /srv. Based on the FHS description, I think I am leaning towards adding /mnt to the removable-media interface, but could easily be swayed to a separate mnt- interface.


#6

I’ve implemented the interface and will post it shortly. I would welcome contributions on the documentation page once it is ready: Interface: legacy-mnt

EDIT: The interface was tentatively renamed to just mnt


#7

/media mounts couldn’t be seen either by some apps, like Discord. Visual Studio Code works fine, however.


#8

This is unrelated to /mnt but let me just say that it depends on the snap using the removable-media interface plug and said plug being actually connected.