Bug 376601 - Cannot delete file: Access is denied - from w2k3 SP2
Summary: Cannot delete file: Access is denied - from w2k3 SP2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: samba
Version: 4.4
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Samba Maint Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-11 22:13 UTC by mark meierjohann
Modified: 2007-11-23 19:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-23 19:45:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Samba Project 2201 0 None None None Never

Description mark meierjohann 2007-11-11 22:13:43 UTC
Description of problem: This looks like Samba Bug 2201
(https://bugzilla.samba.org/show_bug.cgi?id=2201) - deleting a single file
on a Samba share from a W2k3 SP2 Client fails.
Samba log entry: set_delete_on_close_over_all: failed to change delete on close
flag for file
Windows Error: Cannot delete <file>: Access is denied ...

Version-Release number of selected component (if applicable):
3.0.10-1.4E.12.2

How reproducible:
always


Steps to Reproduce:
1. Create file using Windows explorer
2. Delete file using Windows explorer
3. Error Message pops up
  
Actual results: File not deleted


Expected results: File deleted


Additional info: Samba bug: https://bugzilla.samba.org/show_bug.cgi?id=2201

Comment 1 mark meierjohann 2007-11-12 01:35:02 UTC
Possible Patch:
samba.spec:
---------------------------------------------------------------------------
--- samba.spec-dist     2007-11-12 01:32:55.000000000 +0100
+++ samba.spec  2007-11-12 01:35:49.000000000 +0100
@@ -60,6 +60,7 @@
 #Patch30: samba-3.0.11-winsproxy_crash.patch
 Patch31: samba-3.0.10-parse_validation.patch
 Patch32: samba-3.0.10-smbrun.patch
+Patch33: smbd-bug2201.patch
 
 Requires: pam >= 0:0.64 %{auth} samba-common = %{epoch}:%{version} 
 Requires: logrotate >= 0:3.4 initscripts >= 0:5.54-1 
@@ -156,6 +157,7 @@
 #%patch30 -p1 -b .wins_proxy_segv
 %patch31 -p0 -b .parse_validation
 %patch32 -p0 -b .smbrun
+%patch33 -p1 -b .trans2
 
 
 # crap
@@ -489,6 +491,10 @@
 #%lang(ja) %{_mandir}/ja/man8/smbpasswd.8*
 
 %changelog
+* Mon Nov 12 2007 mark <rhbug 3.0.10-1.4E.12.2m
+- added patch for Samba Bug 2201 deleting files from w2k3 SP2
+  https://bugzilla.samba.org/show_bug.cgi?id=2201
+
 * Mon May 14 2007 Simo Sorce <ssorce> 3.0.10-1.4E.12.2
 - Security fixes for
   CVE-2007-2446



smbd-bug2201.patch
----------------------------------------------------------------------
--- samba-3.0.10-orig/source/smbd/trans2.c      (revision 5505)
+++ samba-3.0.10/source/smbd/trans2.c   (working copy)
@@ -2958,10 +2958,12 @@
                 * Only allow delete on close for writable files.
                 */
 
-               if (dosmode & aRONLY) {
-                       DEBUG(10,("set_delete_on_close_internal: file %s delete 
on close flag set but file attribute is readonly.\n",
-                               fsp->fsp_name ));
-                       return NT_STATUS_CANNOT_DELETE;
+               if (!lp_delete_readonly(SNUM(fsp->conn))) {
+                       if (dosmode & aRONLY) {
+                               DEBUG(10,("set_delete_on_close_internal: file %s
 delete on close flag set but file attribute is readonly.\n",
+                                       fsp->fsp_name ));
+                               return NT_STATUS_CANNOT_DELETE;
+                       }
                }
 
                /*


Comment 2 mark meierjohann 2007-11-12 09:44:58 UTC
This patch on its own didn't fix the problem. 
I installed a current samba 3.0.26 and that works like a charm. 

Now we need a RedHat supported solution.

Comment 3 Simo Sorce 2007-11-12 13:44:25 UTC
Can you test the Beta channel packages, we are about to release 3.0.25b in RHEL4
update 6

Comment 4 mark meierjohann 2007-11-13 00:09:40 UTC
Where do I find the Beta Channel??  

In my rhn account 
  * Channels
    * Red Hat Enterprise Linux AS (v. 4 for 64-bit AMD64/Intel EM64T)
      * RHEL AS (v. 4 for AMD64/EM64T) Beta
has no packages, and the old ftp://ftp.redhat.com/pub/redhat/linux/beta/ doesn't
have RHEL4 available.
       

Comment 5 Simo Sorce 2007-11-13 16:24:19 UTC
We are about to release U6, packages have been moved there. they will be
available shortly.

Comment 6 Simo Sorce 2007-11-23 19:45:43 UTC
This should be fixed in U6, please reopen if not.


Note You need to log in before you can comment on or make changes to this bug.