User rights NT/linux

Andrew Bartlett abartlet at
Sat Feb 17 12:26:46 GMT 2001

Darko Cokor wrote:
> Hi!
> Q:    I know linux user/group/other attributes for files.
> When using samba user which have read/write right on
> directory can delete every file in that directory no matter
> what who is owner of that file (root or any other user).
> At first it looked to me as security flaw, but now it looks
> as SMB design politics.
> Am I correct, or my samba 2.0.5a on RedHat 6.1 is
> ready for update?
> Thanks
> Darko

What you have noticed is one of the things about unix systems - its just
the way they are.  Samba doesn't attempt (by default) to override the
standard unix way of doing things, and as such allows this behavior.

If you want the 'logical' behavior I recommend you read the chmod page
and pay attention to the +t attribute.  There may also be a smb.conf
paramater for this.

(OK, so there is some logic behind this behavior, basically stemming
from the fact that adding or deleting file is an operation on the
*directory* not on the file, as you don't need to touch a file to delete
it - simply removing the pointer to it does the job.  This is also why
you can delete an open file, the file is still there - but the only
reference to it is your filehandle, close it and its gone.)

Hope this claifies things,
Andrew Bartlett
Andrew Bartlett
abartlet at

More information about the samba mailing list