chmod of a file seems to always return success

Anders Karlsson trudheim at gmail.com
Sat Feb 3 21:08:26 GMT 2007


On Sat, 2007-02-03 at 13:02 -0800, Jeremy Allison wrote:
> On Sat, Feb 03, 2007 at 08:52:39PM +0000, Anders Karlsson wrote:
> > Hi there,
> > 
> > A follow on question to the 'security mask' / 'create mask' question.
> > When issuing a 'chmod' of a file, and any bits to be changed are blocked
> > (or prevented by the settings) from being changed; 'chmod' still returns
> > success?
> > Looking at behaviour, it looks like the server is stripping out the
> > permission bits the 'chmod' call is not allowed to change, and then
> > perform the operation (that at this point may be trying to change
> > nothing depending on 'create mask' / 'security mask' settings for the
> > share) and return success.
> > Should it not instead disallow the operation and return a fail if the
> > 'chmod' call attempts to change bits it is not permitted to?
> 
> That's probably worth a configuration setting.

Something for 3.0.24, or for later?

> You don't always want arbitrary operations to
> succeed/fail based on the settings on the server,
> the server always has the last word on what it
> will permit.

So to touch on the umask settings on the client, the server has final
word (and probably by default ignore client umask settings) ?

>  Might be an idea to allow the
> client to get an error if the server is refusing
> a particular operation, but probably not set
> by default.

I'd agree, and be happy, with that.

Thanks!

-- 
Anders Karlsson <trudheim at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3549 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070203/6dd5a31c/smime.bin


More information about the samba-technical mailing list