Symbolic links in shares

This topic seems to have a lengthy history, but I don’t see a lot of clarity.  with *ux smb servers, including the wd NAS family, the default behavior for symbolic links in a share is to export the link.  while this may sometimes be the desired behavior, usually its not.  If your share has a link A—>B, most uses will want the client to see B, not the link.  There are many reasons for using symbolic links and wanting this behavior.

I found a fix for this years ago.  In smb.conf, you add a line “unix extensions = no” to the global section.  This has worked for me for years on many linux distributions and platforms.  I’m using it right now on a raspberry pi running raspbian.

This brings me to the wd NAS family. (in my case, the EX2).  When I tried editing smb.conf, I found that on reboot my edits were overwritten.  Certainly prudent behavior if you are WD, trying to maintain a reliable product.  However, that leaves me wondering how I can effect this change in samba behavior on the EX2.  enlightenment would be appreciated

1 Like

Hi there and welcome to the WD community.

I haven’t tried this, since this is not supported by WD. Lets see if another user can help you out sharing some tips and information on this matter. 

hi,

thanks for the reply.

while you may not be familiar with this exact issue, the broader question is how can I change smb.conf so it will not be overwritten by WD configuration control. I realize all the warranty disclaimers.  I’d prefer an authoritative answer from WD on how to effect a needed change in smb.conf.

also, since linux symbolic links wouldn’t be understood by many client machines (e.g. windows), being able to suppress unix extensions in samba is a useful general capability.  as a product suggestion, providing user control of this seems like a good feature for a NAS server, so users can safely set the unix extension option in samba without needing to use an ssh command line.  I’d like to see that feature, and after looking over previous forum posts on symbolic links, it appears many others have wanted control of symbolic links and found no solution.  As an example of the use, if you have files that need to be in a directory and you don’t want to share that directory but want to network share specific files, a virtual directory with symbolic links to the desired shared files is a good solution.  It doesn’t use much disk space, and avoids a need to copy files, which has space and configuration control issues.  I have other examples I’ll omit in the interests of brevity.

If you would prefer authoritative answer from WD, then maybe you should try contacting WD’s Technical Support about this. You can do so either by phone or email.

To Contact WD for Technical Support
http://support.wdc.com/contact/index.asp?lang=en

Support by Country
http://support.wdc.com/country/index.asp

However, please bear in mind that since this is not supported by WD, it is possible for the exact implications of your question to be untested and unconfirmed due to lack of support.

guess I’ll wrap this one up.  The bottom line is that neither WD tech support nor this forum have provided any information on my query regarding configuring network shares to suppress symbolic links.  My only option is to reverse engineer to figure out how WD is doing configuration of busybox.

To summarize:  I purchased the EX2 for network file sharing only.  I have a number of client machines, running various flavors of windows and linux.  I have used Samba and NFS for network fileservers for over 30 years, and am fairly familiar with smb.conf to configure samba.  Samba offers many configuration options via smb.conf.  In my particular case, I am interested in disabling unix extensions.  By default, they are enabled.  If your server uses *ux symbolic links, as mine does, disabling unix extensions is necessary for window clients, which will not understand the links.  This is a one line change in smb.conf that I have used for years.

on the EX2, WD has locked down smb.conf.  users have no interface for changing any samba configuration, for security or other reasons such as mine.  smb.conf exists because the samba developers realize that no one samba configuration will be satisfactory in all cases.  I have confirmed that directly editing smb.conf via ssh and vi does not work, likely because the file is overwritten with a canned version on reboot.  The resulting situation is that WD is selling a fileserver whose samba configuration cannot be configured in basic ways.  Tech support and tech support management would not discuss this, simply stating and restating that its not supported.  While my original message was viewed by over 70 forum members, I have no responses other than moderator acknowledgement.  My suggestion to WD that some form of samba configuration be exposed for users was ignored. 

good luck folks.  the ex2 has locked you into a tight little box.  if it does what you want and is reliable, great.  In my case, in addition to the smb.conf issue, I found the web backup failed consistently between a USB-attached EX2 drive and an internal EX2 drive.  Yet when I ssh’d into the EX2 and ran rsync to back up the internal drive to the USB drive, it worked flawlessly. 

I’ll monitor this forum, but unless some basic improvements are made, I’m going back to my raspberry pi NAS. At least there I can configure smb.conf, and backups are reliable.