Samba fileserver and Mac OS X Clients

February 19, 2009 Posted by mitch | open-source, work | 0 Comments

I ran into a slight issue today with OS X (Leopard), where it would ignore the file permissions forced by my samba file server... In order to maintain users and groups with the correct permissions, I have shares setup like:

[share]
comment = share Volume
path = /srv/SHARE
browseable = yes
writeable = yes
Valid Users =@DOMAIN+"Domain Users"
create mask = 0660
force create mode = 0660
directory mask = 0770
force directory mode = 0770
force group =@DOMAIN+Domain Users
hide files = /__TMP__/.DS_Store/lost+found/

so, I should get files that look like:

-rw-rw---- 1 root root 0 Feb 19 15:07 test1

But the default umask on OS X is 022, so I would get files showing up like:

-rw-r--r-- 1 root root 0 Feb 19 15:07 test2

On the above share... This would prevent other users from changing the files....
Turns out, Apple started pushing for more POSIX compliance and as a result their files would turn up with the permissions assigned to the file on the local system or with their default umask as its created. In a shared world... not always ideal, but I don't want to have to change the umask on all of the OSX clients.... found an option in samba that I added under the [global] section as follows:

[global]
.....
# Make OS X Leopard play nice with others
unix extensions = off

This fixed my problem.


Comments

Post a comment

Random Quote:

Aim for success, not perfection. Never give up your right to be wrong, because then you will lose the ability to learn new things and move forward with your life.

- Dr. David M. Burns

Support:

Pete Ashdown for Senate