It’s my first time setting up samba. I have a read-only public folder with a symlink to another folder in the same partition. Access to the public folder works, and technically to the symlinked folder also works, except it seems unable to list the folder contents, and when browsed from file explorers it falls into an authentication dialog loop.
I tested it from another OpenSUSE machine and from an Android file explorer with smb implementation. Access to other directories and files in the shared folder works fine. The symlink itself works when accessed directly in the machine being shared.
Both the shared folder and the linked have the same owners, test:root, drwxrwxrwx permissions. I’ve also set a samba password for the test user.
testparm -s
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
# Global parameters
[global]
allow insecure wide links = Yes
logon drive = P:
logon home = \\%L\%U\.9xprofile
logon path = \\%L\profiles\.msprofile
map to guest = Bad User
printcap name = cups
smb1 unix extensions = No
usershare allow guests = Yes
usershare max shares = 100
idmap config * : backend = tdb
cups options = raw
[Public]
create mask = 0700
directory mask = 0700
guest ok = Yes
path = /run/media/test/Public
wide links = Yes
smb.conf
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = Yes
usershare owner only = Yes
allow insecure wide links = yes
# try everything!
unix extensions = no
log level = 2
[Public]
path = /run/media/test/Public
browseable = yes
create mask = 0700
directory mask = 0700
guest ok = Yes
public = yes
follow symlinks = yes
wide links = yes
I’ve added samba to the firewall when setting it up, and even disabled the firewall altogether for testing. It doesn’t seem to the the issue.
firewall-cmd --zone=public --add-service=samba
firewall-cmd --zone=public --add-service=samba-client
firewall-cmd --runtime-to-permanent
firewall-cmd --reload
The path to the linked folder is /run/media/test/Public/A
Accessing from smbclient:
> smbclient //10.1.221.50/Public -U test testpss
smb: \> cd A
smb: \A\> ls
NT_STATUS_ACCESS_DENIED listing \A\*
The smb logs shows the auth succeeded:
check_ntml_password: authentication for user [test] → [test] → [test] succeeded
Samba version is 4.22.3-git.403.4e078bdb832SUSE-oS16.9-x86_64
I’m guessing it’s a permission issue. How do I solve this?