[Samba] Cannot Delete File

Robert Steinmetz rob at steinmetznet.com
Wed Nov 26 09:48:48 GMT 2008


I;ve discovered that a user can delete a file if the user owns the 
parent directory.

I've also found this in the logs

>   trish opened file N984Z9~L read=Yes write=No (numopen=2)
> [2008/11/26 04:14:42,  3] smbd/oplock_linux.c:linux_set_kernel_oplock(138)
>   linux_set_kernel_oplock: Refused oplock on file N984Z9~L, fd = 30, 
> file_id = f
> e04:714d. (Permission denied)

It looks like the file are being opened read only and  oplocks are being 
denied.



Robert Steinmetz wrote:
> I just upgraded  my Member Server to 3.2.4 on Ubuntu.
>
> I have a permissions problem. Users can create files on the Samba 
> shares but they cannot delete files. Here is a typical share definition.
>
> [Testing]
>        comment = Test for Samba
>        path = /files/test
>        browseable = yes
>        writeable = yes
>        create mask = 0764
>        directory mask = 0775
>
> On the Linux side I can do whatever I want. On windows I can create 
> directories and delete them, I can create files, open them, modify 
> them and save them back, but any attempt to delete them fails with the 
> error "Cannot delete <filename>: Access is denied The source file may 
> be in use."
>
> On windows XP the file shows the domain user had Full Control and the 
> Domain User Group has read write control. The Linux permissions are 
> 764 although some files are 770 even files with 777 permissions fail..
>


-- 
Robert Steinmetz, AIA
Principal
Steinmetz & Associates


More information about the samba mailing list