[Samba] Cannot remove symlink with missing target -> Synology issue

Andreas Maier andreas.r.maier at gmx.de
Wed Jan 6 21:00:09 UTC 2016

Am 06.01.2016 um 21:23 schrieb Jeremy Allison:
> On Wed, Jan 06, 2016 at 09:00:30PM +0100, Andreas Maier wrote:
>> Jeremy,
>> The only bug I was able to match with the observed behavior is this:
>> https://bugzilla.samba.org/show_bug.cgi?id=9492
>> "unable to POSIX delete symlinks that don't have a valid target"
>> Its status says "NEW". Also, the WHATSNEW.txt files of 4.1.18, 4.3.3
>> and 4.1.22 do not mention that bug, and searching the commit log for
>> "9492" gives no bug with that number.
>> Is this the bug you are remembering?
>> Is it possible that the solution to that bug was not included yet?
> No, more like these (closed) bugs:
> https://bugzilla.samba.org/show_bug.cgi?id=10429
> https://bugzilla.samba.org/show_bug.cgi?id=8663
> https://bugzilla.samba.org/show_bug.cgi?id=7234
> We do have a regression test, test_bad_symlink()
> for this (which we must pass for any code to get
> into the tree).

Bug 10429 (samba returns STATUS_OBJECT_NAME_NOT_FOUND when attempting to remove dangling symlink) sounds the most promising of these. It was included in 4.1.4.

The two older bugs should have been included even before 4.0.

I have meanwhile played around somewhat more and found that enabling the 
recycle bin for the SMB share in Synology DSM is what causes this bevahior.

Also, I double checked how a new SMB resource with default settings 
looks like in smb.conf, and it has the same strangenesses Rowland 
pointed out earlier:

         invalid users=nobody,nobody
         valid users=nobody,nobody
         guest ok=yes
         # browseable=yes
         edit synoacl=yes
         win share=yes
         skip smb perm=yes
         enable recycle bin=no
         recycle bin admin only=no
         hide unreadable=no
         ftp disable list=no
         ftp disable modify=no
         ftp disable download=no
         read list=nobody,nobody
         write list=nobody,nobody

The "enable recycle bin" is one of the many Synology extensions to that 
config file, and it controls the recycle bin.

So unless anyone of you thinks differently, I'll bring this forward to 

Thanks to Jeremy, Rowland and Harald, for your help!


More information about the samba mailing list