Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: does smb is the right way to share files with kodi on another device?

  1. #1
    Join Date
    Jan 2017
    Beans
    152

    does smb is the right way to share files with kodi on another device?

    can you link me to a guide?

    thanks

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: does smb is the right way to share files with kodi on another device?

    Only with Windows and only if you don't use DLNA.
    For Unix systems, use NFS.

  3. #3
    Join Date
    Jan 2017
    Beans
    152

    Re: does smb is the right way to share files with kodi on another device?

    thank you
    i've found this page.
    https://help.ubuntu.com/14.04/server...le-system.html

    so i did :
    sudo apt-get install nfs-kernel-server





    then got stuck because i don't know how to edit the exports file. i mean i know how to open it with nano but i don't know how to tell the HD (i've SSD as the main drive) address.
    so i need to know what to type in the file.

    i've a music folder in the HD and a video folder.
    any idea?

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,599
    Distro
    Kubuntu Development Release

    Re: does smb is the right way to share files with kodi on another device?

    Suppose your network runs in the address space from 192.168.1.1 to 192.168.1.254. On the server you would have entries in /etc/exports like
    Code:
    /path/to/music/folder    192.168.1.0/24(options)
    For options, I usually choose
    Code:
    /path/to/music/folder    192.168.1.0/24(rw,async,fsid=0,no_root_squash,no_subtree_check)
    I need "no_root_squash" so the "root" user, the one you become via sudo, can mount the exported share. On a hard-wired network, you might choose "sync" rather than "async" to protect against the possibility of data loss. Over wifi, I prefer async as it's much faster, but my server runs on a UPS so I'm not worried about data loss due to a power outage.

    If you're exporting multiple shares off the same server, increment the fsid value for each additional share, "fsid=1", "fsid=2", etc.

    You'll need to install the package nfs-common on any client machines as well.
    Last edited by SeijiSensei; June 6th, 2017 at 03:02 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: does smb is the right way to share files with kodi on another device?

    no_root_squash allows root on a client machine to act like root on the remote storage files and directories. It is not enabled by default for security reasons. For media storage, it might make sense to export as read-only to prevent accidental (or kids) media deletions.

    I don't use subnets in the exports either. Some clients might not be trusted, so I really don't want to allow them access. Putting in specific server hostnames on a network where all systems have known, agreed, names, is easy. Just list them and their options on the same line. The options for each client can be different.

  6. #6
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,599
    Distro
    Kubuntu Development Release

    Re: does smb is the right way to share files with kodi on another device?

    I have two or three machines that access those shares on my home network. I use no_root_squash so I can mount them to a location under /media yet enforce permissions by username. My $HOME is on the local drive. I don't have young kids at home.

    The same reasoning applies to my permitting the entire subnet. I don't have any machines that should be blocked from connecting to my server. I also want all my virtual machines to see it, and they use bridging with DHCP by default to get their addresses. Enabling the subnet grants access to new VMs right away.
    Last edited by SeijiSensei; June 6th, 2017 at 10:27 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: does smb is the right way to share files with kodi on another device?

    Never had an issue with userids having access across NFS, except root (which is desirable). Just keep the uids and gids matched, which is easy for end users, but harder for daemon accounts.

    I never mount anything permanent under /media/.

    I will admit to messing with the uid mapping for static html files. It is nice to have a read-only mount on the web server, but still have all the files owned by www-data, but easily edited on another box using a different userid.

    Just goes to show that the simplicity of Unix can be bent to do some handy things. We just need to be aware of choices that impact security.
    Redhat recommends against using no_root_squash. Of course, there are always exceptions.

  8. #8
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: does smb is the right way to share files with kodi on another device?

    You are on right track with NFS.
    However, samba is more widely supported (compared to NFS) but less secure.
    If you have mobile devices, you can get samba to connect, but tough with NFS.
    NFS/SAMBA depends on your use case. If you are doing only Kodi, NFS is just fine.

  9. #9
    Join Date
    Jan 2017
    Beans
    152

    Re: does smb is the right way to share files with kodi on another device?

    https://help.ubuntu.com/14.04/server...le-system.html
    i've followed Installation & Configuration but my libreelec will only access the user folder and not allow to access the files.

    what went wrong in your opinion?

    i really want it to work already.

    tnx

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,599
    Distro
    Kubuntu Development Release

    Re: does smb is the right way to share files with kodi on another device?

    Show us the results of these commands:
    Code:
    sudo mount | grep nfs
    Navigate to the directory above where the NFS share is mounted and run
    Code:
    ls -l
    then go down a level into the directory where the files are stored and run that command again.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •