[Samba] Samba Fails to Delete Folder and Leaves Behind Broken Symlinks

Bob Dill binarybob0010 at gmail.com
Mon Feb 5 01:35:17 UTC 2018


Hi,

After tinkering with Samba, I managed to get my first share working on 
CentOS 7. I can create files and folders. I can delete them too. Except, 
there's one folder (possibly many more) that I can't delete, and I just 
can't figure out why. I have set SELinux to permissive and ensured 
proper ownership permissions. Yet, when I go to delete this folder, the 
files will be deleted, but folders will be turned into broken symlinks. 
Here are some borken symlinks that formed during deletion.

[root at bighoss Administrator]# ls -l
lrwxrwxrwx. 1 laura users      73 Feb  4 19:01 SendTo -> 
/mnt/backup1/Users/Administrator/AppData/Roaming/Microsoft/Windows/SendTo
lrwxrwxrwx. 1 laura users      77 Feb  4 19:01 Start Menu -> 
/mnt/backup1/Users/Administrator/AppData/Roaming/Microsoft/Windows/Start 
Menu
lrwxrwxrwx. 1 laura users      76 Feb  4 19:01 Templates -> 
/mnt/backup1/Users/Administrator/AppData/Roaming/Microsoft/Windows/Templates
[root at bighoss Administrator]# cd Templates
bash: cd: Templates: No such file or directory

Windows gives me no error message. My Mac says "The operation can’t be 
completed because the item “Local” is in use." There is a 'Local' folder 
in a subdirectory of the folder I'm trying to delete. I ran lsof to 
check if anything is using it. No such luck. The files were copied as a 
backup from a previous windows 7 installation. Could there be metadata 
left over that stops samba from deleting the file?

Below is my smb.conf
[global]
         workgroup = WORKGROUP
         netbios name = bighoss
         server string = %h server (Samba, Ubuntu)
         dns proxy = no
         log file = /var/log/samba/log.%m
         max log size = 1000

         security = user
         encrypt passwords = true
         passdb backend = tdbsam
         obey pam restrictions = yes
         map to guest = bad user
         server signing = auto

[laura]
         comment = Linux Samba Share
         path = /mnt/backup1/home/laura
         browsable = yes
         guest ok = no
         read only = no
         create mask = 0755

I ran 'tail -f' on my machines Samba log files and could not find 
anything helpful there either. Has this been seen before? Any ideas of 
how I can fix this problem?

Thank you,
~ Bob



More information about the samba mailing list