[Samba] Symlinks deletion behaviour
forsmb at mail.ru
Sun Mar 18 20:59:12 GMT 2007
Hi List, hi Samba-team,
Recently I've faced some problem with directories deletion trough Samba and trying to clarify the root cause. The following happens:
1. There is a directory my_dir and symlink to it my_dir_link
drwxrwsr-x 48 myuser mygroup 20480 Mar 18 21:53 .
drwxr-xr-x 33 root root 0 Feb 28 17:37 ..
drwxr-sr-x 2 myuser mygroup 4096 Mar 18 21:47 my_dir
lrwxrwxrwx 1 myuser mygroup 57 Mar 18 21:53 my_dir_link -> /test/my_dir/
2. When I try to delete my_dir_link via Windows Explorer (under myuser who is a memeber of mygroup) I get "Cannot remove folder my_dir_link: The directory name is invalid". At the same time all files from my_dir_link(=my_dir) being deleted ok. My_dir can be deleted without any problem
In the log I see the following:
[2007/03/18 23:50:42, 5] smbd/filename.c:unix_convert(108)
unix_convert called on file "test/my_dir_link"
[2007/03/18 23:50:42, 3] smbd/reply.c:rmdir_internals(3923)
rmdir_internals: couldn't remove directory test/my_dir_link : Not a directory
[2007/03/18 23:50:42, 3] smbd/error.c:unix_error_packet(91)
unix_error_packet: error string = Not a directory
[2007/03/18 23:50:42, 3] smbd/error.c:error_packet(147)
error packet at smbd/trans2.c(2592) cmd=1 (SMBrmdir) NT_STATUS_NOT_A_DIRECTORY
Share is defined as follows:
path = /share
force user = myuser
force group = mygroup
read only = No
strict allocate = Yes
printable = no
follow symlinks = Yes
wide links = Yes
So, is it an expected behaviour, bug or something? Any clue is highly appreciated. I'm using Samba 3.0.20b from SLES9, but testing showed the same behaviour on 3.0.22 as well.
More information about the samba