Best way to share a local drive from libreelec

  • Hi,

    I have a libreelec instance running on a Pi 3. Connected to the Pi 3 via a USB SATA is a large hard drive. I would like to use it to dump various other files from my Pis. On one Pi I have mounted a share to the remote libreelec hard drive like this

    sudo mount -t cifs -o auto,rw,perm,username=root,password=libreelec //libreelec.local/Kodi_Media/Motion Motion

    The Pi that I want to connect to the Libreelec mounted drive has the username pi

    The permissions on the local Pis mounted folder are like this

    drwxr-xr-x 2 root root 0 Apr 11 2019 Motion

    I cant change the write permissions on it using

    sudo chmod 777

    Is there a way to get write permissions, or even a better way to get write access to the hard drive on the libreelec Pi ?

  • I must admit that I miss a lot info's I need to completely understand how your setup is.

    dump various other files from my Pis

    dump once or dump often time by time?

    for the first => just move the the disk to that Pi's ...

    sudo mount -t cifs -o auto,rw,perm,username=root,password=libreelec //libreelec.local/Kodi_Media/Motion Motion

    AFAIK, external disks in LE are mounted under /var/media/

    how do you get to the path "//libreelec.local/Kodi_Media/Motion" ?

    The Pi that I want to connect to the Libreelec mounted drive has the username pi

    what OS it that Pi running ?

    I guess one with user management ?

    cause - AFAIK- LE has user "root" only

    drwxr-xr-x 2 root root 0 Apr 11 2019 Motion

    cause the folder "Motion" is owned by root and only root has write access, non-root user can't write to folder Motion

    I cant change the write permissions on it using


    sudo chmod 777

    the sudo command should read "sudo chmod 777 Motion"

    I guess you can't change the write permissions cause of mount you used (see my 2. question)


    Anyway there is wiki entry for samba:

    https://wiki.libreelec.tv/how-to/mount_network_share

    ===

    a (partly) hardcore solution could be (NOT a solution if the other Pi's have different user [-names] )

    sudo chown -R <username-of the-remote-Pi-user>:<groupname-of-the-remote-Pi-user> <where-the-external-disk-is-initial-mounted>

    be aware:

    after that command the Pi-user is able to write on the whole disk and "rm -rf" is a special write command

    other solution (unsure if it works out)

    - create a folder, let say "0_dump" on the external disk ("0_" for to be on top of an ls -l command or easier finding)

    - sudo chown -R <remote-user>:<remote-user-group> 0_dump

  • Is there a way to get write permissions, or even a better way to get write access to the hard drive on the libreelec Pi ?

    I think the best solution for sharing a hard drive is to use a drakkan/sftpgo docker container. It is very easy to manage via web, it allows you to add and remove users and manage permissions and quotas, it has a problem: it is only compatible with x86-64 and arm64, but not with arm32v7. There is also the tabbyjun/sftpgo-arm32v7 container but I haven't tested it and the last update is four months ago.

    The supported protocols of this server are: SSH/SFTP, FTP and WebDAV, and fail2ban protection can also be activated.

    I use it on my LE x86-64 server, and WebDAV Remote Access from Kodi clients, File Manager from Linux, Cyberduck from Windows, and X-Plore from Android. It works very well.