I have setup a Samba server as file and print server. Everything works perfectly, I can print, I can write, delete files through Samba. But, the only thing that does not work is to delete a NON-EMPTY directory. No error message received, just don't want to delete it. As soon as I delete all files from the directory, then the directory can be deleted too. The problem is recursive for subdirectories.
The shared folder is owned by root : products_admin
drwxrwsr-x 2 root products_admins 4096 Feb 13 07:56 data
This directory contains another directory created through his samba share
drwxrwsr-x 2 bas products_admins 4096 Feb 14 09:08 a_new_directory
As you can see, the directory is owned by user bas (that would be me) and by the group products_admin.
User bas is member of group products_admin.
The content of directory a_new_directory:
-rwxrwxr-x 1 bas products_admins 6769 Dec 12 10:14 softice.txt
I am trying to delete the directory with the same user bas, but this only succeeds when the directory is empty. Still I can rename it independently of it's content.
I know that in UNIX world, you can delete a folder which has some contents, only if you delete it's contents recursively. This should be specified in command line using option -R (-r). By default UNIX does not ask you if you want to delete the content of the directory. It's just give you an error message saying that what are you trying to delete is a directory (he thinks that you don't know that
) I think here is the same kind of problem.
Just think how awful is to delete a directory with lots of subdirectories. I don't think it's a permission problem (it can't be) and I could't find any posts on this problem over the internet.
Thanks for help,