Bug 376601 - Cannot delete file: Access is denied - from w2k3 SP2
Cannot delete file: Access is denied - from w2k3 SP2
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: samba (Show other bugs)
4.4
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Samba Maint Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-11 17:13 EST by mark meierjohann
Modified: 2007-11-23 14:45 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-23 14:45:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Samba Project 2201 None None None Never

  None (edit)
Description mark meierjohann 2007-11-11 17:13:43 EST
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-11 20:35:02 EST
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@02m.org 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@redhat.com> 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 04:44:58 EST
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 08:44:25 EST
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-12 19:09:40 EST
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 11:24:19 EST
We are about to release U6, packages have been moved there. they will be
available shortly.
Comment 6 Simo Sorce 2007-11-23 14:45:43 EST
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.