Hello, I was happily using my Raspberry Pi 3 to share a USB disk, using SMB installed from the OSMC app store.
Then, my phone company changed my router, and the Pi got a different ip address, from 192.168.1.7
to 192.168.1.171
Everything else is unchanged.
This is the the smb.conf file:
[global]
# If you require a fully custom smb.conf create smb-local.conf instead of editing smb.conf so your
# configuration will not be overwritten by samba upgrades. You can use smb.conf as a template by
# copying it to smb-local.conf then removing the config file line below in the new file. If you only
# need to add some additional shares see smb-shares.conf below for a simpler way to do this.
config file = /etc/samba/smb-local.conf
workgroup = WORKGROUP
security=user
follow symlinks = yes
wide links = no
unix extensions = no
lock directory = /var/cache/samba
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
map to guest = bad user
# usershare template share = automount template
# Automount template disabled to work around a samba bug causing crashes accessing external drives.
read raw = Yes
write raw = Yes
strict locking = no
min receivefile size = 16384
use sendfile = true
aio read size = 2048
aio write size = 2048
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
[osmc]
browsable = yes
read only = no
valid users = osmc
path = /home/osmc
comment = OSMC Home Directory
[automount template]
browseable = yes
-valid = no
valid users = osmc
path = %P
hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/
# Add custom shares in smb-shares.conf instead of editing smb.conf so they will not be
# overwritten by samba updates. You can only add new shares to smb-shares.conf, not change
# the default shares or global options. If you need full control see smb-local.conf above.
include = /etc/samba/smb-shares.conf`
It is what is coming with the app store smb, I don’t think I touched anything.
The smbd daemon start and stop without reporting any error.
In the /var/log/samba/log.smbd
log, i see errors like this:
[2017/07/08 21:41:36.450017, 0] ../source3/param/loadparm.c:3171(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/3tb failed. Permission denied
‘3tb’ is the name of the share, and it is the usb disk that is mounted under /media/3TB. That file has this permission:
-rw-r--r-- 1 root root 141 ago 5 23:38 3tb
Could it be the issue? The smbd daemon runs as root, so I don’t think that it is, but my linux knowledge is limited.
From the Pi itself, smbclient correctly shows the share:
$ smbclient -L 192.168.1.171
Enter osmc's password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]
Sharename Type Comment
--------- ---- -------
osmc Disk OSMC Home Directory
IPC$ IPC IPC Service (Samba 4.2.14-Debian)
3TB Disk Auto-mount Volume
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]
Server Comment
--------- -------
FASTGATE Samba Server
OSMC3 Samba 4.2.14-Debian
Workgroup Master
--------- -------
WORKGROUP OSMC3
But from my Windows 10 PC I cannot see it.
Any hints to solve this?
Thanks!