I have a new Synology NAS (DS1621+), and have begun integration into my home network. I'm having some problems using it with my Linux hosts. I can mount the NAS, but the permissions (as seen from Linux) are not what I want them to be. I'm under the impression that ownership & permissions can be "mapped" from the NAS to my Linux clients, but it's unclear to me how this is done. My Linux hosts are all Debian-based units, and file services provided by the Synology NAS are via SMB. From Linux, I use the cifs-utils suite (mount -t cifs ...) to mount the shares.
I've contacted Synology, and was surprised to learn:
1: Synology does not provide tech support to "command line" users.
2: Synology claimed their SMB implementation is proprietary, and do not provide any (useful) documentation on the interface.
I suspect that Synology's implementation is not that far off mainstream, but after some trial-and-error, I'm still having "permissions issues". Also, the mount.cifs manual has many options whose purpose and effect are vague to me.
Are there any Linux tools available that can help identify how the various options and parameters in mount.cifs affect permissions as seen from the Linux client's perspective? I'd like to eliminate as much of the trial-and-error as possible.
I'm interested in using SMB instead of NFS because I've heard more negatives on NFS than I have SMB.
I have created the users on the Synology side and added them to the SMB config there.
EDIT: 2022-07-12; More reading, findings
The variables which seem to be in play are:
- the state of the Linux implementation of the "Unix Extensions" to SMB, and the version on my client machine
- the state of the server's (Synology's) implementation of SMB/Samba
- the state of the server's (Synology's) implementation of the "Unix Extensions"
In an effort to improve the quality of this question, I've attempted to define these variables in the context of my question:
- Re the state of the Linux implementation of the "Unix Extensions":
$ mount.cifs --version mount.cifs version: 6.11 # NOTE1: Unix Extensions are enabled by default per man mount.cifs # NOTE2: see also 'modinfo cifs' - Re server (Synology) version of SMB/Samba:
$ ssh admin@SynologyNAS-1 /$ samba --version Version 4.10.18 /$ uname -srm Linux 4.4.180+ x86_64 Re server (Synology) version of the "Unix Extensions"
I'm at a loss on how to do this, so I tried
smbclient:
$ smbclient \\\\SynologyNAS\\rpi_share -U=pi Enter WORKGROUP\pi's password: Try "help" to get a list of possible commands. smb: \> help ? allinfo altname archive backup blocksize cancel case_sensitive cd chmod chown close del deltree dir du echo exit get getfacl geteas hardlink help history iosize lcd link lock lowercase ls l mask md mget mkdir more mput newer notify open posix posix_encrypt posix_open posix_mkdir posix_rmdir posix_unlink posix_whoami print prompt put pwd q queue quit readlink rd recurse reget rename reput rm rmdir showacls setea setmode scopy stat symlink tar tarmode timeout translate unlock volume vuid wdel logon listconnect showconnect tcon tdis tid utimes logoff .. ! smb: \> ? posix HELP posix: turn on all POSIX capabilities smb: \> posix Server doesn't support UNIX CIFS extensions. smb: \> ? chmod HELP chmod: <src> <mode> chmod a file using UNIX permission smb: \> chmod test-touch-4B.txt 666 Server doesn't support UNIX CIFS calls. ... 2022-07-12; Conclusions & Revised Questions?
The above results with smbclient suggest that with respect to SMB/CIFS, my client software is up to speed, but my shiny new Synology NAS is far behind the curve.
My original question now becomes, "Are these results accurate; is there a more conclusive or accurate method to determine the status of a product when the vendor refuses any information on it?"
For those with similar questions, I can only offer this:
In my case: I
mountusing Synology userpicredentials. Doing so leaves my Linux userpiunable to write to the mounted share - despite the fact that Synology userpihad been given R&W privileges in the Synology DSM. I found that adding theuid=piandgid=pioptions to mymount -t cifscommand, at least enabled the Linux userpito write to the SMB share on the Synology server. Why this works I will have to leave for others to answer.
Further Reading:
- The SMB UNIX Extensions Wiki
- CIFS VFS - Protocol extensions to the Common Internet File System for better POSIX file I/O semantics
- A Search: what are the "Unix Extensions" for SMB/CIFS/Samba?.
- Samba version 4.3 or newer supports SMB 3.1.1
- Linux cifs mailing list
mount.cifsandmount.smb3are nearly the same; refman mount.cifs- which is also the manual formount.smb3.- The SMB3-Linux Wiki
- Are SMB POSIX Extensions Same As SMB Unix Extensions?... Apparently not
- CIFS Protocol Extensions Update, fm 2006 (This has been
YEARSin the making) - A Tour through the CIFS Protocol Extensions and Linux CIFS client, fm. 2008.
- SMB3 POSIX Extensions Phase 2 ... what is next? (fm. 2020)
- The video of #10 above
- The Linux kernel user’s and administrator’s guide » CIFS (note: more verbiage by Steve French)
- What Is SMB Protocol and Why Is it a Security Concern?
- Server Message Block - Wikipedia
sshon NAS and try to see how they configuresamba