Hi, recently I try to start a samba server on my Manjaro linux server.
I used the default smb.conf setting and add a share which “guest ok =yes”. But when I access this samba share from my another windows/linux. I get a “permission denied” error. My share path is “/mnt/sda 1” which is a NTFS drive to store my data, its owner and group is ‘root’ and permission is ‘777’.
The trick thing is when I change the path to ‘/tmp’. The samba share can be accessed but other path is not (e.g.my home path)
I tried to google this and someone said it’s a SELinux issue. But as I know there is no SELinux in Manjaro.
Does anyone know how can I troubleshoot this issue? thanks in advance!
here is my smb.conf file:
[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
client min protocol = SMB2
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
map to guest = Bad Password
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = nobody
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare owner only = yes
force create mode = 0070
force directory mode = 0070
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[share]
comment = share
path = /mnt/sda1
browseable = yes
read only = yes
create mask = 0700
directory mask = 0700
guest ok = yes
#valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no