[Samba] Windows Application Overriding Samba Settings

Adam Nielsen adam.nielsen at uq.edu.au
Fri Sep 22 01:12:00 GMT 2006

> directory mask = 0750
> create mask = 0750
> My understanding is that this should LIMIT the maximum permissions
> that can be set for a file or folder created by Windows or a Windows 
> application.

AFAIK, these options only set the default permissions, a program can
still change them if it wants.

> In addition, I have also played with specifying the following options:
> force directory mode = 2040
> force create mode = 2040

Again, these force the permissions to a certain value when creating a
file, but they don't stop the permissions from being changed once the
file exists.

> But NOW The Windows application seems to be completely getting around 
> the limits that I imposed with Samba and Linux. All files and folders 
> are getting set as: 0777

There are two things that could be happening - it's possible that the
attributes are being mapped to UNIX permissions (so if the program sets
the archive bit, that's translated to the execute permission) or more
likely, the program is checking which users have access to the file and
is granting them all access (similar to what would happen if you
right-click on a file, go to the Security tab and grant all users
access there.)

I'm not sure of a way around this, but if there is one I'm sure it'll
involve restricting the changing of permissions on files that already
exist (I'm pretty sure there are options related to this, check out the
smb.conf manpage.)


More information about the samba mailing list