How to access to my server Samba debug


Few years ago I created a folder under my external USB hard drive called RPi2 Data at the root level.
Within this folder I’ve 2 sub-folders, music and video.

I installed SAMBA and created a user henri. I don’t very much remember what I’ve done but ideally I gave to this user full access to my folder RPi2 Data (read, write and execute).

However it never worked :joy:
Now it is time to spend a bit of time to understand why.

This is what I have when I do ls /mnt/USB -l

drwxr-xr-x 1 root root 131072 Jan  1  1970 RPi2 Data
drwxr-xr-x 6 root root   4096 Jan  1  1970 volumio_data

Then I wanted to understand what existing user I have so I did cat /etc/passwd


Here is my smb.conf file:

netbios name = RHAPSODY
server string = Volumio Audiophile Music Player
workgroup = WORKGROUP
security = user
map to guest = Bad User
encrypt passwords = yes
wins support = yes
local master = no
preferred master = no
os level = 30

[Internal Storage]
        comment = Volumio Internal Music Folder
        path = /data/INTERNAL
        read only = no
        guest ok = yes

        comment = Volumio Internal Music Folder
        path = /mnt/USB
        read only = no
        guest ok = yes

        comment = Volumio Internal Music Folder
        path = /mnt/NAS
        read only = no
        guest ok = yes

[Music NAS]
        comment = RPi External Music library
        path= /mnt/USB/RPi2\ Data/
        browseable = yes
        writeable = yes
        public = no
        guest ok = no
        read only = no
        valid users = henri
  • Primo when mounting my server using smb://rhapsody.local, I can’t see Music NAS.
  • Secondo using the username and password associated to henri I can have access to a folder called USB within inside two folders RPi2 Data and volumio_data
  • Terzo, it looks like I don’t have the permission to open the folder RPi2 Data

How to debug this?

  1. I’m trying to understand hot to identify the group henri belong to
  2. Which groups and users can access to the Music NAS?
  3. Can I add an additional user and group to my folder RPi2 Data
  4. Does my samba conf is properly setup
  5. Why I don’t see Music NAS as a proposal when I tempt to log into my server

I’m running Volumio 2 on a Pi3 and accessing to my server via macOS X Mojave.

Thank you for your kind help :slight_smile:

Any idea?

I’ve tried to create a folder from the beginning.
while connected to Volumio by ssh I created a folder using the command mkdir at the root directory on my external hard drive.
mkdir /media/RPi2\ Data/SharedVideo

The I edited the smb.con file
sudo nano /etc/samba/smb.conf

        comment = RPi External Video Shared library
        path= /media/RPi2\ Data/SharedVideo
        writeable= yes
        valid users= henri
        create mask= 0777
        directory mask= 0777

I created the user henri
sudo smbpasswd -a henri

Restarted SMB
sudo systemctl restart smbd

Then when accessing to the mounting point I got access denied.
When I read the owner of each folder within my external file I’ve this:
volumio@rhapsody:/media/RPi2 Data$ ls -l /media/RPi2\ Data/
total 1024
drwxr-xr-x 1 root root 131072 Aug 29 2017 $RECYCLE.BIN
drwxr-xr-x 1 root root 524288 Dec 3 2016 Music
drwxr-xr-x 1 root root 131072 Jun 28 09:22 SharedVideo
drwxr-xr-x 1 root root 131072 Aug 29 2017 System Volume Information
drwxr-xr-x 1 root root 131072 Aug 28 2017 Videos pi

I can see that only root groupe and user has access to the file.
I tried to update the permission of the file created earlier to the new user but did not work.
chown -R henri:henri /media/RPi2\ Data/SharedVideo
chown: changing ownership of ‘/media/RPi2 Data/SharedVideo’: Operation not permitted

What would be your solution and advice in order to allow my new user henri to access via smb to the new shared folder?


Do you connect via ssh using volumio as user?
chown required you use ‘sudo’

Indeed I’m connected in ssh using Volumio as a user.

How is your drive formatted? If NTFS, then you might be running into problems with the way that Windows deals with permissions. Have a Google for “samba share NTFS linux”

I’ve formatted in exfat :slight_smile: allowing me to use it on my Mac as well

exfat doesn’t contain any permissions metadata. You might need additional drivers for some Linux OS: Volumio should work OK. What version of Volumio are you using (good to include in OP, along with device info.)

Hello Chsims1,

I’m using the build 2.777 and my computer from which I’m trying to access to the smb volume is macOS Mojave 10.14.6

I’ve done additional research today which suggested me to install smbclient to execute a command.
sudo apt-get install smbclient

the command was smbclient -L localhost

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]

Sharename       Type      Comment
---------       ----      -------
Internal Storage Disk      Volumio Internal Music Folder
USB             Disk      Volumio Internal Music Folder
NAS             Disk      Volumio Internal Music Folder
Music NAS       Disk      RPi External Music library
Video           Disk      RPi External Video Shared library
IPC$            IPC       IPC Service (Volumio Audiophile Music Player)

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]

Server               Comment
---------            -------
RHAPSODY             Volumio Audiophile Music Player

Workgroup            Master
---------            -------

Would it be linked to exFAT?
Who are using exFAT to share an external hard drive connected to a Volumio system?


Firstly, exfat should be fine.
Secondly, the smbclient command that you ran shows the current samba shares on localhost (your RPi that you ran the command on). So it “sees” the folders on your USB hard drive as “Music NAS” and “Video”.

You shouldn’t need to be fiddling round with samba/smb.conf to get this to work, because Volumio already shares the /mnt/USB folder on installation.

I would suggest that you do a complete fresh installation of Volumio, and look for your music folder under ‘Music Library’, ‘USB’ directly from the Volumio UI. If there are no files in the appropriate directory on your hard drive, then this will be empty (you don’t say if you have actual music files on the drive), but your Mac should be able to see the share folder itself. You can then try copying some files across.

1 Like