5

I'm having some serious permission issues with Mac client machines (OS X Snow Leopard) connected to a UNIX server (running CentOS) through Samba. No matter which permissions I set for a file on the server, the Mac ignores them and changes the permissions back to 766.

My goal is to be able to lock a file (744) from other users when its in use or open on a client machine. Other clients should be able to read the file during this time, but not be able to write to it. I found a thread that describes my problem almost exactly suggesting to use the "unix extensions = off" parameter in the global section of the smb.conf file, but to no avail. The parameter is rejected by the "testparm" command on the the version of Samba I am running (3.4); The compiling issue is resolved by changing the parameter to "unix extensions = no" but still fails to resolve the issue.

The same issue arises when I attempt to use AFP.

I'm really unsure of where to turn next, does anyone have any suggestions or information I can utilize to solve this problem?

Thanks!

Chealion
  • 5,753

4 Answers4

8

Sorry this doesn't help the OP, but I can confirm that

unix extensions = no

worked for me. I have Macs running Snow Leopard connecting to Linux (lenny/sid) server with Samba 3.2.3. I am posting this so people will still try that. Much like others, before I put the unix extensions = no line in, the force create mode was being ignored.

mikehapner
  • 1,195
  • 10
  • 9
4

Samba has two ways of setting perms for an uploaded file:

  1. Without UNIX extensions: preset file/directory mask is used
  2. With UNIX extensions (which probably MacOS client has): that allows clients to control file perms

Here's the lines you should add to config file (smb.conf):

# For case 1: no UNIX extensions
create mask = 0644
directory mask = 0755
# For case 2: override UNIX extensions
force create mode = 0644
force directory mode = 0755

(Should be placed BEFORE any share definition goes: this looks like [share name] in square braces and a couple of indented lines. These sets will then apply to all shares you have)

Also read about force group and force user in man smb.conf, if you need it.

kolypto
  • 11,588
0

In addition to the "force create mode" and "force directory mode" options suggested by kolypto, you may also need

force directory mode = 2770
force security mode = 660

See man smb.conf to adapt the mode bits to your needs.

mivk
  • 4,924
0

I think this is not the correct answer of your questin, but it can help you http://www.linuxconfig.net/2009/11/16/file-server-with-samba-and-ftp-in-freebsd.html