How do I find the cause of a problem with SMB (Samba) folders on a QNAP?
First decide whether the whole NAS is unreachable or only one folder or file. The first is the network, the service or the sign-in; the second is permissions. Check in order, only reading, and change one thing at a time. Make changes in the panel, not with commands that delete files.
Topic: Shares and volumes
Steps when the whole NAS is unreachable
- Check the network from the computer:
pingthe NAS's address, then its name. If the address works and the name does not, name resolution is at fault. - Try to open the folder by address, such as
\\192.168.1.20\folder, instead of by name. - SSH
An encrypted connection to a command line on another computer.Check the service on the NAS. Over SSH as root:/etc/init.d/smb2_protocol.sh status pidof smbd lsof -i :445 /usr/local/samba/bin/testparm -sThe first command shows whether the daemon runs and the highest protocol version.
lsofshows whether anything listens on port 445.testparmonly reads the configuration. /usr/local/samba/bin/smbclient -L localhost -U accountfirewall, zapora sieciowa
Rules that let network connections through or refuse them.It works on the NAS but not on Windows: the computer, the network or a firewall is at fault. If it does not work on the NAS either, read the error message, check the account, its password and the service, and then the folder itself with the same account.
- SMB
The file sharing protocol of Windows, used by macOS and Linux as well.On Windows remove the old connection to this NAS (net use, thennet use \\address\folder /delete) and connect with the account. Windows 11 24H2 Pro, Enterprise and Education require SMB signing by default; see Why does Windows reject the user name or password for a NAS folder?.
Steps when it is one folder or file
Steps when the NAS is in an Active Directory domain
Check that the domain controller answers and that the NAS's and the controller's clocks agree. Then:
wbinfo -p
wbinfo -t
/usr/local/samba/bin/net ads infowbinfo -p asks the winbind daemon, and wbinfo -t checks the trust with the domain. On a NAS that is itself a domain controller, net ads does not apply.
Check that it worked
What not to do
- shared folder, folder udostępniony
A folder of a volume that users open over the network.Do not overwrite/etc/config/smb.confwith the default file. The default file has only the global section, so every shared folder disappears from Samba. - Do not delete the
.sambaor.locksfolders ortdbfiles. Their place depends on the system, and on a domain controller that loses the domain's data. Ask support first. - Do not turn on SMB 1 or lower the protocol version to "make it work".
- Do not leave Samba's log level high. It loads the NAS and fills the disk.
- Do not download programs (
tcpdump, for example) from unknown links. You can record the traffic with Wireshark on the computer.
Sources
- QNAP: Configuring Samba (Microsoft networking) settings
- Microsoft: Access Denied when you access an SMB file share
Checked: 25 November 2026, QTS 6.1.0.3656 (beta) and QuTS hero h6.1.0.3656 (beta). The Active Directory commands were not checked in a domain.