Symlink visible as link on clients via SMB2

Joined
Dec 24, 2018
Messages
5
With Ubuntu Client 16.04 and Server 14.04 it was possible to view and create symbolic links via SMB1 protocol on the server. Due to security reasons SMB2 is demanded in FreeNAS 11.2 and creating symbolic links result in error message: "Operation not supported on transport endpoint".

What I have tried so far is to test with Auxillary Parameters: allow insecure wide links = yes, follow symlinks = yes and wide links = yes on server and client side.
But symbolic links created via FreeNAS web shell are always shown as folder and not as link on client side.

1546376468804.png

  • Is there somehow a way to enable symbolic link creation in FreeNAS with clients over SMB2?
  • If I need to use symbolic links on Linux systems should it be done only through NFS shares?
 
Joined
Dec 24, 2018
Messages
5
No not yet - for the moment I would use NFS. I'm pretty sure that SMB2 protocol might has a flag to enable support. Couldn't find it but I also do not exactly know where to search. :p

Just can state: If Ubuntu Client is forced via fstab to use SMB2 to connect to Ubuntu Server, symlinks are not allowed to create on client side, but existing are shown as folders.

*** Ubuntu Client via SMB1***
fstab ->
//ubu-srv/data /mnt/data cifs auto,iocharset=utf8,vers=1.0 0 0

1546870717696.png
1546870823891.png



*** Ubuntu Client via SMB2***
fstab ->
//ubu-srv/data /mnt/data cifs auto,iocharset=utf8,vers=2.0 0 0

1546870314621.png
1546869960971.png



*** Ubuntu Server ***

1546870041947.png
 
Joined
Dec 24, 2018
Messages
5
Guess I found a solution with a little hint from here:D

The trick was to add on client side an additional mount option mfsymlinks. Linux and Windows links are now allowed to create on a share. But it seems that at least SMB protocol v2.1 or higher is required.
Btw. On FreeNAS I've removed all auxillary parameters like allow insecure wide links = yes, follow symlinks = yes and wide links = yes from share settings. Only UNIX Extensions is set at service settings.

fstab entry looks now like this: //freenas/netshare /mnt/netshare cifs auto,mfsymlinks,guest,iocharset=utf8,vers=2.1 0 0

Which Samba protocol version a linux client should be used depends probably on the other nodes connected to the share (?). The Samba docs and wiki SMB2 and SMB3 have an overview about available versions and their functions (e.g. SMB2_10: Windows 7 SMB2 version). Which version the clients are using per share can be verified with the command smbstatus in FreeNAS shell.

So NFS just for the speed then ... :p

In addition it depends on which system the symlinks are created. If it is done directly in FreeNAS shell, symlinks are still shown as folder or file itself and Linux and Windows links are just some files on zfs:

*** FreeNAS shell ***

1547213102481.png



*** Ubuntu Client ***

1547213606444.png



*** Windows 7 ***

1547214482999.png
 
Last edited:
Top