Running file manager remotely on LE host as docker container - SOLVED

  • I want to be able to copy media files stored on my "headless" LE server across several USB disks mounted on that server - directly on the server, and NOT by passing them through my laptop across SMB or SFTP. So I installed Docker on LE and created Dolphin container app which I can access remotely through the browser on my laptop.

    So far so good, but if I browse LE file system remotely as "root" with Dolphin (installed as a docker container app on my LE server) my <media> folder is empty as opposed to when I browse <sftp://libreelec.local/media> with Thunar from my laptop.

    BTW, when I use Thunar on my laptop to browse LE media folders, it pops up "login" screen, and I choose "Log in Anonymously" - it works just fine.

    Is it that I cannot see my <media> on USB disks mounted with fstab on LE machine because my Dolphin "root" doesn't have the permissions to see SMB folders on LE server?

    I've installed Dolphin on docker with the following commands:

    docker run -d --name="Dolphin" \

    -e USER_ID="0" \

    -e GROUP_ID="0" \

    -e WIDTH="1280" -e HEIGHT="720" \

    -v /storage/.kodi/userdata/Container/dolphin/config:/config:rw \

    -v /storage/.kodi/userdata/Container/dolphin/mount/point:/mnt:rw \

    -e TZ=Australia/Sydney \

    -p 8050:8080 \

    -p 3389:3389 \

    aptalca/docker-dolphin:latest

    I suspect I need to run Dolphin docker app logging in as root / libreelec - instead of having USER_ID and GROUP_ID set to 0 / 0 (as -e above) - to see the hidden ".kodi / .local" folders ("downloads" and "media") ?? But how?

    And what is the actual file structure (PATH) on Kodi which is hidden under the metalinks <sftp://libreelec.local/media> and <smb://libreelec.local/> ??

    PS - I've tried running MC with PuTTy but it crashes and locks up when I copy/paste or move large files across different USB disks :(

    Edited 4 times, last by bpr323 (June 20, 2020 at 1:35 AM).

  • Likely your volume mapping is incorrect. Docker is a sandboxed env. Containers have access only to things that are specifically allowed.

    Add this volume mapping: -v /storage:/storage then the entire storage folder on host will be available inside the container at the /storage path

  • Thank you so much Aptalca - that worked, although partially. I modified the docker run command to include

    -v /storage:/storage \

    -v /media:/media \

    Now I can see (under the "root" folder) the contents of <storage/downloads/> and </media/> folders. The latter is where my USB disks are mounted.

    I can only cut & paste within the <downloads> folder - and it's SUPER FAST, 10gb in 30 sec (compared to 12mb/s if I do it across SMB).

    PROBLEM

    If I copy a file from <downloads> and try to paste into one of the USB drives under <media> - that option is greyed out (disallowed).

    Strangely, the <media> folder is owned by root, but the SSD's in that folder are owned by 1000 (nobody?).

    The <downloads> folder is owned by root, as mentioned above I have no problem cutting/pasting anywhere in that folder.

    Here's the screenshots:

  • You're running as root, so you shouldn't be having permission issues with writing. Can you browse the locations and read the existing files on the usb disks?

    The issue might be due to how the drives are mounted on host

  • 1) When I browse USB disks attached to LE by using smb or sftp links in Thunar on my laptop - I see them from terminal as

    XXX@mx:/run/user/1000/gvfs/smb-share:server=libreelec.local,share=ssd-1 or

    XXX@mx:/run/user/1000/gvfs/sftp:host=libreelec.local/media/SSD-1 and I have no problems with read/write.

    2) When I'm using Dolphin from docker I cant read only 2 out of 5 USB disks in the <root/media>.

    However, I can NOT "paste" into any subfolders,

    My screenshots 1 and 2 above show the <root/media> folder is owned by root, and one would assume that this ownership will be recursive to subfolders (i.e. SSD's). But no - they are owned by User 1000 Group 1000 - please have a look at the Dolphin screenshots in my previous post.

    It would be great if you could help me with some nifty options in the docker run command to force the permissions down to the SSD's <root/media>

    ??? -e USER_ID="0" \

    ??? -e GROUP_ID="0" \

    Please? :)

  • SOLVED the solution was right under my nose, too easy for a non-programmer! :)

    Changed User and Group ID's to 1000 and - bingo! Quick as a flash file cut/copy/paste on the LE host server without pulling the files across SFTP/SMB to my laptop. Kudos to Aptalca - cheers for creating the Dolphin container, champion! :thumbup:

    ################################################

    Running Dolphin GUI (browser) file manager as a Docker container the LE host:

    docker run -d --name="Dolphin" \

    -e USER_ID="1000" \

    -e GROUP_ID="1000" \

    -e WIDTH="1280" -e HEIGHT="720" \

    -e TZ=Australia/Sydney \

    -v /storage/.kodi/userdata/Container/dolphin/config:/config:rw \

    -v /storage/.kodi/userdata/Container/dolphin/mount/point:/mnt:rw \

    -v /media:/media \

    -v /storage:/storage \

    -p 8050:8080 \

    -p 3389:3389 \

    aptalca/docker-dolphin:latest

    Navigate to <http://192.168.XXX.XXX:8050/#/client/c/Dolphin>

    And, of course, you need to configure:

    1) Transmission to save files in storage/downloads instead of the default setting in the transmission folder

    2) Make sure any USB disks and auto-mounted by LE at start-up

    Docker source - <Docker Hub>

    ###############################################

    Could one of the admins add this post to the LE tutorials please?