Phil Dumont
Dabbler
- Joined
- Jun 23, 2016
- Messages
- 14
Is "wide links" supported in FreeNAS's version of samba?
Simple example...
On the FreeNAS machine, in a dataset called vol1:
Then I share /mnt/vol1/wide_links_test, as a CIFS share named "wide_links_test", with the following auxiliary parameters...
...and un-check "Unix Extensions" in "CIFS Settings".
Then from a Windows client, in a cygwin shell:
The accessibility of passwd_copy_ln shows that symlinks are being followed, but the inaccessibility of passwd_ln indicates that wide links is not being honored. Am I doing something wrong, or is wide links just not done in FreeNAS?
Note 1: No, I don't really want to share the passwd file. This is just a simple, contrived example.
Note 2: Yes, I know about the security implication of wide links. I want to do it anyway. When/if I get it working, I'm going to be sharing the symlink-containing directory read-only (CIFS and NFS), so no one will be able to put "bad" links on it.
samba config file attached
Simple example...
On the FreeNAS machine, in a dataset called vol1:
Code:
[root@storinator2] /mnt/vol1# mkdir wide_links_test [root@storinator2] /mnt/vol1# cd wide_links_test [root@storinator2] /mnt/vol1/wide_links_test# cp /etc/passwd passwd_copy [root@storinator2] /mnt/vol1/wide_links_test# ln -s /etc/passwd passwd_ln [root@storinator2] /mnt/vol1/wide_links_test# ln -s /mnt/vol1/wide_links_test/passwd_copy passwd_copy_ln
Then I share /mnt/vol1/wide_links_test, as a CIFS share named "wide_links_test", with the following auxiliary parameters...
Code:
follow symlinks = yes wide links = yes
...and un-check "Unix Extensions" in "CIFS Settings".
Then from a Windows client, in a cygwin shell:
Code:
$ cd //storinator2/wide_links_test $ ls -l total 3072 -rw-r--r-- 1 ???????? ???????? 1670 Jul 8 11:20 passwd_copy -rw-r--r-- 1 ???????? ???????? 1670 Jul 8 11:20 passwd_copy_ln -rw-r----- 1 phil None 1670 Jul 7 10:46 passwd_ln $ for i in *; do echo ==== $i ====; head -1 $i; done ==== passwd_copy ==== root:*:0:0:root:/root:/usr/local/bin/bash ==== passwd_copy_ln ==== root:*:0:0:root:/root:/usr/local/bin/bash ==== passwd_ln ==== head: cannot open `passwd_ln' for reading: Function not implemented
The accessibility of passwd_copy_ln shows that symlinks are being followed, but the inaccessibility of passwd_ln indicates that wide links is not being honored. Am I doing something wrong, or is wide links just not done in FreeNAS?
Note 1: No, I don't really want to share the passwd file. This is just a simple, contrived example.
Note 2: Yes, I know about the security implication of wide links. I want to do it anyway. When/if I get it working, I'm going to be sharing the symlink-containing directory read-only (CIFS and NFS), so no one will be able to put "bad" links on it.
samba config file attached