Bug 5073 - Unable to delete a readonly file despite "delete readonly" being set
Summary: Unable to delete a readonly file despite "delete readonly" being set
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.26a
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-11 14:44 UTC by David Shaw
Modified: 2007-11-12 13:40 UTC (History)
0 users

See Also:


Attachments
Fix for deleting readonly files (754 bytes, patch)
2007-11-11 14:45 UTC, David Shaw
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Shaw 2007-11-11 14:44:42 UTC
Using 3.0.26a, I was unable to delete a file with mode 0400 through a SMB mount.
I do have "delete readonly" set.

I tracked this down to nttrans.c:reply_ntcreate_and_X() where there is a readonly
test to determine whether can_delete_file_in_directory() is called or not.
Unfortunately, there is no lp_delete_readonly check to disable the readonly test.
Comment 1 David Shaw 2007-11-11 14:45:27 UTC
Created attachment 2962 [details]
Fix for deleting readonly files

Here is a patch that works for me.
Comment 2 Jeremy Allison 2007-11-12 13:40:31 UTC
Applied for 3.2.0 - thanks !
Jeremy.