Bug 2088 - read-only attribut and inherit permissions do not go together
Summary: read-only attribut and inherit permissions do not go together
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.9
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-24 17:17 UTC by Tobias Oetiker
Modified: 2005-08-24 10:17 UTC (History)
0 users

See Also:


Attachments
Patch gone into SVN. (6.17 KB, patch)
2004-11-29 17:18 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Oetiker 2004-11-24 17:17:33 UTC
I was trying to figure out why tortoise svn was not able to use my
samba share as a drive todo its checkout ... eventually I found that the
problem was that svn was not able to set the read-only attribute on files.

Further investigation showed that it was possible to remove a read-only
attribute but not to set one ...

eventually I found that in 

dosmode.c there is code which checks if the share is in 'inherit permissions
mode' if so, it simply throws away any read-only attribut it gets.

smbd/dosmode.c:70

/* Clear "result" */
result = 0;

if I do not set the inherit permissions flag, all works well.

this does not make sense to me, especially because setting all the other
attributes works regardles of the inherit permissions flag.

any ideas why the result=0 was put in there ?

I would assume that permission inheritance is especially interesting for new
files, not for existing ones ...
Comment 1 Jeremy Allison 2004-11-29 17:18:40 UTC
Created attachment 813 [details]
Patch gone into SVN.
Comment 2 Jeremy Allison 2004-11-29 17:19:34 UTC
Fixed this (hopefully) by adding a BOOLean so we know if the file should be new
(and thus inherit permissions or not).
Please test SVN code.
Jeremy.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:17:15 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.