chmod of a file seems to always return success

Jeremy Allison jra at samba.org
Sat Feb 3 21:02:25 GMT 2007


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.
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. 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.

Jeremy.


More information about the samba-technical mailing list