Hello, I am using Samba version 4.2.0rc4-GIT-4701d74. When using a connection in protocol smb2 or smb3, the unix client says symlinks are not supported, for example: # mount //ip.addr/Programs ./tmp -o vers=3.0 # cd tmp # ln -s bla blub ln: failed to create symbolic link ?blub?: Operation not supported # mount //ip.addr/Programs on /mnt/tmp type cifs (rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=markus,domain=OFFICE,uid=0,noforceuid,gid=0,noforcegid,addr=ip.addr,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=1048576,wsize=1048576,actimeo=1,user=markus) I suspect it is because unix extensions are off (there is always "nounix" written in the mount output). I tried the config option "unix extensions = yes" explicitly (should be the default), but no change unfortunately. I also experimented with the "allow insecure wide links" options and similar candidates but had no luck to enable symbolic links (but maybe I missed the right combination?). When connecting with default NT1 protocol symbolic links work as expected. Are symbolic links not supported in newer protocols anymore or am I missing some configuration options? Markus
I am using Samba 4.1.16 with smb2/3 and symbolic links are working alright. Following the smb.conf man page, I use: unix extensions = no wide links = yes
On Fri, Jan 23, 2015 at 12:07:31PM +0100, Markus Doits wrote:> Hello, > > I am using Samba version 4.2.0rc4-GIT-4701d74. > > When using a connection in protocol smb2 or smb3, the unix client says > symlinks are not supported, for example: > > # mount //ip.addr/Programs ./tmp -o vers=3.0 > # cd tmp > # ln -s bla blub > ln: failed to create symbolic link ?blub?: Operation not supported > > # mount > //ip.addr/Programs on /mnt/tmp type cifs > (rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=markus,domain=OFFICE,uid=0,noforceuid,gid=0,noforcegid,addr=ip.addr,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=1048576,wsize=1048576,actimeo=1,user=markus) > > I suspect it is because unix extensions are off (there is always > "nounix" written in the mount output). > I tried the config option "unix extensions = yes" explicitly (should be > the default), but no change unfortunately. > > I also experimented with the "allow insecure wide links" options and > similar candidates but had no luck to enable symbolic links (but maybe I > missed the right combination?). > > When connecting with default NT1 protocol symbolic links work as expected. > > Are symbolic links not supported in newer protocols anymore or am I > missing some configuration options?POSIX-style symlinks are not supported in SMB2, the POSIX varient of this protocol hasn't been specified (yet).
The smb.conf man page explains it all: wide links (S) This parameter controls whether or not links in the UNIX file system may be followed by the server. Links that point to areas within the directory tree exported by the server are always allowed; this parameter controls access only to areas that are outside the directory tree being exported. Note: Turning this parameter on when UNIX extensions are enabled will allow UNIX clients to create symbolic links on the share that can point to files or directories outside restricted path exported by the share definition. This can cause access to areas outside of the share. Due to this problem, this parameter will be automatically disabled (with a message in the log file) if the unix extensions option is on. See the parameter allow insecure wide links if you wish to change this coupling between the two parameters. Default: wide links = no
On 23.01.15 19:57, Miguel Medalha wrote:> I am using Samba 4.1.16 with smb2/3 and symbolic links are working alright. > > Following the smb.conf man page, I use: > > unix extensions = no > wide links = yes > >Unfortunately this still does not work for me - can you really make a symbolic link ("ln -s ...") when you are connected with smb2/3? Does "smbstatus" really show smb2/3 connection?