Sharing additional folders from LibreELEC via SMB

LibreELEC already has some share folders which you are able to access via SMB. See here: Accessing LibreELEC via SMB.

You are able to add other folders being shares via SMB as well. To do so read the following.

The Console way:

Use SSH to login into LibreELEC.

Let's imagine you want your Home folder being shared as well. The path to the LibreELEC Home folder is as follow: /storage/

Navigate to the .config folder via:

cd /storage/.config

Inside that folder you will find a file which is called: samba.conf.sample. To have LibreELEC to use that file instead of the default one, copy it into a new file samba.conf via:

cp samba.conf.sample samba.conf

To edit this file, use the editor nano:

nano samba.conf

In that file (at the bottom of it), you will see the already shared folders, which will look like:

  path = /storage/.update                                                       
  available = yes                                                    
  browsable = yes                                                               
  public = yes                                                            
  writable = yes                                                  
  root preexec = mkdir -p /storage/.update  

You can use that as a template to create other shares. So what do those lines mean?

[Update] is the name of the share how it will come up in your file browser

path is the path to the folder the share will link to

available will mean that it (the share) is available and…

browsable will be browsable

public it will be accessable from everyone in the network

writable you are able to specify if you want it read-only or not

root preexec means that the folder will be created if it does not exist before.

Now we want the Home folder being shared as well. To do that, add the following to the bottom of the file:

  path = /storage/                                                      
  available = yes                                                    
  browsable = yes                                                               
  public = yes                                                            
  writable = yes                                                  

Save the changes to the sample.conf file via CTRL-o, and exit the nano editor via CRTL-x.

and use systemctl restart nmbd smbd to restart the samba- and the netbios-service after the changes are made. The root preexec part is not needed in that case, as the /storage folder does exist for sure.

After restarting the services, you will see the the shared folder in your file-browser you use to access LibreELEC via SMB.

The GUI Way

In the following description I'm using Ubuntu to access the already given shares. Therefore it might look different from the Microsoft Windows File Explorer, but the handling is generally the same.

Access the LibreELEC SMB shares like mentioned here: Accessing LibreELEC via SMB

After you accessed the LibreELEC, it might look like this:

That's the place where we will see the new folder being listed once we share it. As you can see, there's no “Home” folder listed yet.

Now enter the Configfiles folder.

Inside that folder you will have the file samba.conf.sample. Just copy that file into a new file named samba.conf by 'right-clicking' on the sample file and select “copy”. Then use “paste” to create the new file. Rename it to “samba.conf”.

To edit the renamed samba.conf file, use an editor that is capable of Linux/Unix newlines on your OS. For example, Notepad++ for Windows, or gedit for Ubuntu/Linux.

Add the following to the bottom of the file:

  path = /storage/                                                       
  available = yes                                                    
  browsable = yes                                                               
  public = yes                                                            
  writable = yes                                                  

and save that file.

After that, reboot your LibreELEC machine and the share named “Home” is listed: