Benches macOS

5

Leopard and Samba Shares

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi,

I have a Samba-Server (3.0.28a) on a Linux machine running with shares for

Windows- and Mac-Users.

All new files and directories that was saved on the

server have the right permissions during the

configuration file smb.conf and the parameters

"create mask" and "directory mask".

Since the update to Leopard for the Mac, the permissions

will be ignored. Every file copied from the Mac to the

server have the permission 0644 and directories 0755

independet of "create mask = 0640" and "directory mask = 0750"

of the smb.conf configuration. The permissions of files,

copied with Windows to the Samba server are good.

Tests with the parameters like "force create mode" and

"force directory mode" have no success. The user permissions

are the same and doesn't changed.

1. Is there a bug in Mac OS 10.5.2 (Leopard) to work with Samba shares,

or a problem with ACLs? Because Tiger doesn't use ACLs (i think so) and all was fine, but in the Samba configuration ACL support is switched on.

Sometimes the finder (Leopard) doesn't show directories and files on shares, after a reboot of the Mac the objects are available again!? For me it's look

like an inconsistent performance.

2. Or is there a change in the permission technology

by Leopard, where is a different handling in Samba necessary?

Thank you and

best regards

oelauge

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    There is a change in Samba and the Leopard SMB client that can have adverse affects on how ACLs are interpreted. Filesystem ACLs have been supported starting in Mac OS X 10.4, so that hasn't changed directly in 10.5.

    But this problem would be a server-side problem on your Linux box. Here's why:

    Whenever files are copied, Mac OS X uses the following protocol: the POSIX permission bits of the copy are always retained. In other words, if the original file is 0755, then the copy will be 0755; however, the POSIX owner will be changed to the currently connected user. (Currently-connected can mean the user who logged in for cases where no permission masking applies. These cases will be limited to situations where the server and client are part of a common directory domain, such as Active Directory or Open Directory. For all other situations, masked permissions apply, and the currently logged-in user receives the permissions assigned to the user who connected to the share point.) Typically, the POSIX group is changed to match the group of the destination container (the folder that will hold the copy).

    So, let's say Joey copies this file (to which Joey can only read):

    SomeFile.txt

    POSIX owner: Sally

    POSIX group: SallyandFriends

    POSIX permissions: 0644

    ...to this folder on the SMB server where Joey connected as snoopy, and snoopy is a member of peanuts...

    ServerFolder

    POSIX owner: linus

    POSIX group: peanuts

    POSIX permissions: 0777

    ...thus, Joey's copy should look like this:

    SomeFile.txt - copy

    POSIX owner: snoopy (because Joey connected to the server as snoopy - these are masked permissions)

    POSIX group: peanuts (inherited from the parent)

    POSIX permissions: 0755 (preserved)

    The create and directory masks are for newly-created files and folders on the server, but not copied files or folders!

    The real solution here would be to enable ACLs on your Linux server volume.

    --Gerrit

  2. 0

    oelauge

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thank you,

    but ACL is switched on on the server. But i found the problem. The Unix Extensions in the samba client makes the problem. I switched off this functions on server side with the parameter "unix extensions = off" and it runs.

    Best regards

    oelauge

  3. 0

    jeff.vancampen

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks oelauge.

    I just upgraded from Tiger to Leopard and was having the same issue. Files were being created with permissions that appeared to ignore those specified by the "create mask" and "force create mode" parameters.

    Your recommendation worked perfectly! My issues disappeared after adding the *unix extensions = off* parameter to the
    [global] section of the smb.conf file:

    <pre>

    [global]

    # Make the file server play well with others (i.e. OS X Leopard)

    unix extensions = off

    </pre>

    (N.B. Adding it in the share sections, e.g. [homes], doesn't work.)

  4. 0

    tobiasD

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I have the same problem. ACL is enabled and umask für new directories is 0755 but if I create a new dir 10.5.4 updates the rights to 0700. to switch off the unix extensions would help, but they are switched on for a reason (other linux-boxes who need it, so I cannot switch it of)

    Any idea how to change this behavior?

    best regards

    Tobias

  5. 0

    NOHO

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This smb.conf, "unix extensions = off", mod saved me with a similar situation.

    I am running a Leopard 10.5.5 OS X Server and I'm sharing QuickTimes files via Samba. I found that I was able to playback the QuickTimes with a user who had read-only privileges on a Windows box, but when I mounted the shares on a Leopard box, I would get file permission errors. When I mounted the same share using AFP, I could playback the files. After adding this line, I can now play read-only files properly using SMB.

    Thanks,

    Eric