Kathy
2009-Nov-25 00:24 UTC
[Samba] Deletion of directory symlink via Samba deletes files in original subdirectory on Unix
Hello -- We have a Solaris 10 ZFS server running Samba with "follow symlinks=yes" set. We're noticing that if you delete (via Samba) a file that is a symbolic link pointing to a subdirectory somewhere, with files in that subdir, it will not only delete the symbolic link file, but also delete the files in the target subdirectory. On Unix, if you delete a symbolic link, it will leave the original target subdir (and its files) untouched. This behavior only seems to happen if the symlink is pointing to a populated subdirectory. If you have a symlink that points to a file and delete the symlink via Samba, the original file remains intact. Does anyone know of a way to get around this particular behavior? We would like it to behave as in Unix. Only the symlink gets deleted and not the subdir/files it was pointing at. Thanks for the help -- Kathy
Jeremy Allison
2009-Nov-25 00:45 UTC
[Samba] Deletion of directory symlink via Samba deletes files in original subdirectory on Unix
On Tue, Nov 24, 2009 at 04:24:13PM -0800, Kathy wrote:> Hello -- > > We have a Solaris 10 ZFS server running Samba with "follow > symlinks=yes" set. We're noticing that if you delete (via Samba) a > file that is a symbolic link pointing to a subdirectory somewhere, > with files in that subdir, it will not only delete the symbolic link > file, but also delete the files in the target subdirectory. On Unix, > if you delete a symbolic link, it will leave the original target > subdir (and its files) untouched. This behavior only seems to happen > if the symlink is pointing to a populated subdirectory. If you have a > symlink that points to a file and delete the symlink via Samba, the > original file remains intact. Does anyone know of a way to get around > this particular behavior? We would like it to behave as in Unix. > Only the symlink gets deleted and not the subdir/files it was pointing > at.What version of Samba ? Jeremy.
Kathy
2009-Dec-02 21:59 UTC
[Samba] Deletion of directory symlink via Samba deletes files in original subdirectory on Unix
I'm reposting this because I posted it last time and then ran off to Thanksgiving vacation. The last question regarding it was what version of Samba we are using. We have multiple versions on different flavors of Unix: 3.0.25a (Solaris 10 package), 3.0.33 (RHEL 4 package), and hand compiled 3.2.8 on RHEL 5. All versions behave the same and have the same issue. The issue: If you delete a Unix symlink via Samba that points to a directory full of files, it will not only delete the symlink, but also the files inside the pointed to subdirectory. The subdir remains intact, but now empty with no files. Any ideas? I am going to compile the latest and greatest Samba and put it on a test machine to see if it resolves the problem. Thanks -- Kathy