Docker containers can't see shared folders and sometimes dissapearing.

  • Hello, Im pretty new to all this but I've been following tutorial videos and threads to setup my OMV server. I'm having some issues with docker though and I'm not sure if I'm doing something wrong or there is an issue with my install.


    For simplicity I setup my shared folders to be read and write for everyone. I've tried setting up dockers for plex and emby, but for some reason they cannot see my shared folders. I've followed tutorials from Technodad Life on installing and it goes just fine. Once I have the docker running, I try to set the media folders in plex or emby and I cannot see my shared folders which is where my media is located.


    Another issue I'm facing is anytime I try to edit a docker I get and error upon saving. Then the docker container just dissapears and I have to set it up all over again. I know I had done this before and was able to edit. But this happens to every single docker image I try to run. They just vanish if I edit or stop running them.


    I currently have a tranmission with OpenVPN docker and nextcloud docker up and they seem to be running properly. If I were to try and edit them they will dissapear though.

  • Most likely explanation for your troubles is that the user the containers run as does not have adequate permissions to access the shared folders and/or the the actual file systems directories on the disks. Check these very carefully.


    Be advised that setting Privileges and/or ACLs in the OMV Shared Folders panel is not the same thing as setting file system permissions. And it's the latter that are vitally important.


    I never make any Privileges and/or ACL settings in the OMV Shared Folders panel.


    The easiest way to avoid problems like this is to NOT use Shared Folders in docker Volume and bind mount settings. Use the actual filesystem locations instead, but only after you are sure the permissions on those filesystem locations are correct.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    The easiest way to avoid problems like this is to NOT use Shared Folders in docker Volume and bind mount settings

    I use Emby and I never pointed emby:docker to shared folders, set those up within Emby itself, I'm guessing it's the same for Plex.


    But I do know the emby:docker install sets those to be set up in Volumes and Bind mounts within the container.

    Raid is not a backup! Would you go skydiving without a parachute?


    OMV 6x amd64 running on an HP N54L Microserver

  • You do not want any Plex Volumes and Bind mounts created within the container.


    For Plex running in a docker you need to setup the Volumes and Bind mounts external to the container yourself, and from within the Plex interface you have to configure your media locations as the Container paths when you define your Librarys.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Alright, so how can I check/change file system permissions for the shared folders? The way I have it setup, which is the same as in the tutorial videos, is this:


    Run docker, set PUID and GUID
    Set /config under /sharedfolders/Appdata/plex
    Set /data under the same
    There is not /library setting which I think was shown in the video


    Then I open plex and add a library, look for folder location. I see everthing like /root, /usr, /etc, whatever else, but no /sharedfolders. So the docker is using the appdata shared folder but the plex application itself cant even see /sharedfolders.


    So does this still sound like a filesystem permissions issue?


    Also, what exactly do you mean by not using shared folders but instead filesystem location? Do you mean set it to /appdata instead of /sharedfolders/appdata, so I would be making a new folder in the main directly instead of as a shared folder?


    Sorry if I sound dumb but I want to actually understand what is wrong and how to fix it. Like I said Im pretty new so I may need more in depth explanation to understand if you are willing. Thanks!

  • First, are PUID and GUID a real user and group on your machine?


    You set /config to /sharedfolders/Appdata/plex but where is /sharedfolders/Appdata/plex on your system? What is the real physical directory? Does the user you specified in PUID have read and write permissions on that directory?


    Yes, that's what I mean by not using shared folders.


    The top two causes of docker problems around here are incorrect networking specifications for the container and incorrect filesystem ownership and permissions on the filesystem outside the container.


    Networking problems are almost completely avoided by running containers in Host networking mode which almost always just works all by itself. Running a Bridged networking connection means you set the entire thing up by hand where every thing you specify might be a mistake or might introduce an incompatibility.


    Not much can be said about filesystem ownership and permissions other than they must be correct or the container will not be able to communicate with the disk(s) in the machine.


    A more subtle problem has to do with relativity. When you specify directorys and files within a program running inside the container, all those references must be on and along the Container paths, not the absolute filesystem locations outside the container.


    When you tried to add a Library in Plex and went looking for the /sharedfolders but didn't see it, the reason is that the container is running as a user that does not have read permission on either the sharedfolder or the directory referenced by the shared folder.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Yes the PUID and GUID are 1000 and 100 which is the id of "user1" that I created.


    I'm a little bit confused about the real physical directory. When I SSH into the server and view the file system, /sharedfolders is a directory on the main screen. When I go to it, it contains all of my shared folders and files. Isn't that the actual directory or is it somehow located somewhere else and just referenced? I don't see any of the content/folders anywhere else in the filesystem.

  • Are you saying you have no idea where you stored all the media files you wish to serve with Plex?


    Did your media files exist on any of your hard drives before you created any shared folders?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Are you saying you have no idea where you stored all the media files you wish to serve with Plex?


    Did your media files exist on any of your hard drives before you created any shared folders?

    I know they are stored in /sharedfolders/media/Videos. That is the only place I can find them.


    I added the media to my drives through SMB from a Windows machine. So I had already setup the shared folders and then added the media. So the answer to your question is no.

  • Start looking in /srv


    This is one of the reasons I don't use /sharedfolders in docker volume and bind mounts. If you don't know where the files and directoryies really are, you can't determine their ownership and permissions. And if those are wrong, you aren't going to get anywhere.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Start looking in /srv


    This is one of the reasons I don't use /sharedfolders in docker volume and bind mounts. If you don't know where the files and directoryies really are, you can't determine their ownership and permissions. And if those are wrong, you aren't going to get anywhere.

    Oh wow it was right there in /srv! I can't believe I missed that. Thank you so much for all your help! I actually got Plex and Emby dockers to access my media.


    For future reference, how should my media be stored? I would assume /media is a good spot for it and then add it as a shared folder afterwards?

  • /media is not a good choice. That directory is on the root file system and if you start placing a lot of files there you will eventually run out of room on that drive and things will break.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Your data drives are mounted in /srv with unique directory names as the mount points. That's where.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • I seems to be have similar problem but with SABnzbd, I have run container with PUID 1000 PGID100 (user1), I have folders permission set to that user as well, I have /srv/dev-disk-by-label-vol1/ and there appdata, downloads, movies etc folders with permission to rw for that user as well. I set docker container with that folders accordingly (pictures attached) but when I get to webui of SABnzbd and get to folders tab, to set folders I can see on to of it :Default Base Folder: /config
    I can't changed it and all my downloads folders are in that base folder, I can browser the directory tree but this is like on docker container only so I can not see /srv/dev-disk-by-label-vol1/ and sub-folders (even that I set them during container set up).
    However as I browser the appdata folder I can see all that subfolders.
    So container get access to that folder and that folder is on /srv/dev-disk-by-label-vol1/ so why it can't see other folders?



  • In the SABnzbd web interface page /config/folders/ page what do you have set for these?


    Temporary Download Folder:


    Completed Download Folder:

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • At this moment I did not change anything, this is the reason of my post. I tried browser the to set this to folders up but I can't see my shares/hosts paths. I can only browser like inside container or docker as I can see my directories but they are not on main system.
    But that /config is attached to /appears as it should be as when I set:

    • Temp folders to /config/downloads/incomplete
    • Complete folder to
    • /config/downloads/complete

    Both directions are at my /appdata on shares as well so I can access them from SMB. So in some cases it is not that bad as files are probably going to HDD not sdcard with OMV. But why snbnzb can't see other folders?

  • OK still a bit of unkown but I reckon I have screw up permission somewhere. I think if it does not exists it is worth to write some kind of guide about permissions (as it can be set in 3 different submenus in OMV webgui, there are obviously diffrent for person who know about Linux but for people like myself there are a bit confusing.
    Other things is existence of /sharedfolders folder and /srv/dev-disk-by-label-vol1/. I think people get confusing when they ssh as root use mc and they see /sharedfolders in main trunk so hop there and folders are there so they are using this path in many instances but I think it is not good practice.


    Anyway I am learning at least. One way to make OMV closer to consumer NAS software is simplify way to set permission. I had synology and they did it death easy by setting user and shared folders setting up who has access where and done. But apart of that OMV is really good.


    Cheers

  • This is how they are set for me and I have no problems:


    Code
    Temporary Download Folder: /incomplete-downloads
    
    
    Completed Download Folder: /downloads

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

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