Mount Options

  • Is it possible to edit the default mount options for shared folders?


    I have a docker container running emby (media browser), but the emby config folder (which can get really large) is pointed to a shared folder. Unfortunately, emby includes it's own version of ffmpeg, which sits in this config folder. I've been trying to figure out why transcoding won't work, and I suspect it's because shared folders in OMV, by default, are mounted noexec... hence ffmpeg refuses to work :(


    So I want to be able to mount the shared folder without the noexec option.



  • It would take some conversation to help you. I suggest you use the openmediavault-emby plugin instead. I think you will find it a lot more user friendly and it works. :)


    What I've done is ahead of the best image they have out.

    • Offizieller Beitrag

    Is it possible to edit the default mount options for shared folders?


    Yes is it possible, for currently mounted disks look at /etc/openmediavault/config.xml the mntent tags you'll see opts, take out the noexec flag. After you change it run omv-mkconf fstab and reboot. For future mounts look at the documentation indicated here in this file


    /usr/share/php/openmediavault/globals.inc


    I have a docker container running emby (media browser)


    That is a very wise decision. I got mine running in 10 minutes (time that took me to pull the image from the hub)


    but the emby config folder (which can get really large) is pointed to a shared folder. Unfortunately, emby includes it's own version of ffmpeg, which sits in this config folder. I've been trying to figure out why transcoding won't work, and I suspect it's because shared folders in OMV, by default, are mounted noexec... hence ffmpeg refuses to work


    Well, depends on the image i guess, because i pulled the official one docker pull emby/embyserver and the ffmpeg is inside the container in /opt/ffmpeg, i just tested and just in case moved the config folder to a default ext4 one with noexec and there was not an issue playing content from the webinterface.


    Hope this helps

  • The data disks are mounted noexec as a security measure. It you have executable files, like ffmpeg & ffprobe, that reside on one of the data disks it is always safer to move them to a location on the system drive (e.g. /usr/bin or /usr/sbin) and create symbolic links to folder from where they originated. People that are downloading untrusted data should heed this warning.


    Sub, could you put in a code box the init script from the emby image you pulled.


    See example of symlink in the attached picture. ffmpeg folder was moved to /usr/local/bin and then symlink created where the folder originated from with this:


    cd /media/118a45c0-2f2b-4e1c-91c7-eaca09d75737/emby
    ln -s /usr/local/bin/ffmpeg ffmpeg


  • Well, depends on the image i guess, because i pulled the official one docker pull emby/embyserver and the ffmpeg is inside the container in /opt/ffmpeg, i just tested and just in case moved the config folder to a default ext4 one with noexec and there was not an issue playing content from the webinterface.


    I'm not sure which version of the official docker build you've been using, but the one I use puts the configurations in a volume /config, which of course, you can map wherever you like on the host system. I was originally hosting it in /etc/emby, but it can get surprisingly large and my OS drive isn't very big. So I moved it to a shared folder. This works, and the web interface will still continue to play content. But it won't transcode because ffmpeg won't execute. I can't say for certain that this is the issue... but I moved the config directory back to /etc/emby and transcoding immediately started working.


    I considered a whole range of options, but in the end decided to just stick with keeping it in /etc/emby, and just increasing the size of my OS drive.


    I did spend some time playing with the emby plugin, and it seems to work quite nicely. But I generally prefer using docker, at least for certain applications... particularly one like emby. Docker allows me to put some controls around the amount of resources the application uses. My NAS has a fairly limited CPU, so transcoding can slow it down somewhat. Docker allows me to minimise the impact on the host system.

  • I also tested transcoding and worked well. As I say the ffmpeg is inside the container (at least in in my docker the official one)


    I understand that ffmpeg is inside the container, but is that a volume that sits on the host system in a folder mounted with noexec?


    If so, then that basically means that Docker ignores the underlying file system and will allow you to execute a binary that's on a filesystem mounted as 'noexec'. That would seem strange to me. But then it's not the first time Docker has surprised me.

    • Offizieller Beitrag

    I understand that ffmpeg is inside the container, but is that a volume that sits on the host system in a folder mounted with noexec?


    Yes, but the noexec flag doesn't exist in my village (btrfs) and is not possible, i also moved the /var/lib/docker to one of the media folders. Did you move your containers/images location to another location different than rootfs?


    If so, then that basically means that Docker ignores the underlying file system and will allow you to execute a binary that's on a filesystem mounted as 'noexec'.


    I have no idea, i'll have to research about that. Because in my case doesn't apply

    • Offizieller Beitrag

    If so, then that basically means that Docker ignores the underlying file system and will allow you to execute a binary that's on a filesystem mounted as 'noexec'.


    getting to think more about it if there was noexec flag wouldn't the container not run at all? you're missing one feature but the whole mediabrowser is still running, makes you think right?

  • By default, Docker stores containers in /var/lib/docker, which on openmediavault will be on the same hard drive as the base operating system. As a generally rule, all the executables inside the container should work because they are essentially on the same file system as any executables on the host system.


    The problem occurs when you create an image with volumes that you map to a mounted file share. For example, I created an Emby container with a volume called /config, and mapped it to /media/[UUID]/Emby on the host. Therefore, any executables stored in the directory /config are, on the host, stored on a file system mounted as noexec. I was a bit bored at work, so I tested this with a basic debian container. And sure enough, Docker won't run these executables.


    I'm guessing the reason why transcoding works in your case, is because the container you are using is storing ffmpeg somewhere in /opt. Looking through the init scripts, it looks like there might be some kind of runtime option to specify where ffmpeg sits.


    Sorry if that sounds a bit convoluted... it's taken a little bit of time for me to work out in my own head :)

    • Offizieller Beitrag

    Sorry if that sounds a bit convoluted... it's taken a little bit of time for me to work out in my own head


    Try the other image i pointed you, i've realised that i had the /config map to a drive in ext4 noexec. So it has nothing to do in my case with btrfs.


    If you want to be sure just check /config folder (inside or outside) and look for the ffmpeg executable if you find it there. And BTW maybe look at the logs of the emby, something could be there.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!