Benches macOS

5

Folder marked EVERYONE = READ&WRITE, but …

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Server = Mac OS X 10.5.6

Client Machine = Mac OS X 10.5.6

I have a share point called "Test Share" with the following permissions:

Owner = Root = Read & Write

Group = Admin = Read & Write

Others = Read Only

I then have a sub-folder called "Files" with the following permissions:

Owner = Root = Read & Write

Group = Admin = Read & Write

Others = Read & Write

I'm not using any ACL permissions.

I have two users, User1 and User2 — neither with admin privs or anything special.

User1 logs into the server, mounts "Test Share" and copies a file into "Files".

User2 logs into the server, mounts "Test Share" and copies the file User1 placed into "Files" from the server to their local desktop.

When User2 then opens this file in photoshop (it's a JPEG), they can't save the file and get the error that the file is locked. They can delete the file from both their local desktop and the server, but they can't edit the file and save it. What's going on here? This doesn't seem right.

When I look at the file in Server Admin, it has the following permissions:

Owner = User1 = Read Only

Group = Admin = Read Only

Others = Read Only

Why are these permissions Read Only?

The parent folder is Read & Write (for Owen/Group/Everyone), so why is the file completely Read Only for all of them?

Any advice would be appreciated!

Kristin.

5 replies

Sign in or join Beachball Help to reply.

  1. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    In order to accomplish what you need, you must use ACL permissions.

    Whenever new items are created, their *POSIX permissions* are set via the umask. Since the default umask returns owner can read/write and POSIX group and POSIX everyone can only read, newly-created items in any folder to which a user can write will have their POSIX permissions assigned as follows:

    The POSIX owner will be the user who creates/saves the file (the action-bearing user). The POSIX group will be inherited from the parent.

    The POSIX permissions will be owner can read/write with POSIX group and POSIX everyone set to read-only.

    So that explains this behavior:

    +The parent folder is Read & Write (for Owen [sic]/Group/Everyone), so why is the file completely Read Only for all of them?+

    Remember that the action-bearing user only needs write permission to the parent in order to create new files or folders therein, but the parent's POSIX permission bits do not just magically inherit onto new children created there!

    Previous versions of Mac OS X Server did include an AFP Inherit Permissions from Parent hack, but that has been discarded because ACLs provide much easier control over permission inheritance. ACLs have been available in Mac OS X Server since 10.4, available in April 2005. See my post here for more details about that:
    http://discussions.apple.com/message.jspa?messageID=9209840#9209840

    *What to Do*

    If you want to provide pervasive read/write access for a particular group, you must use an ACL. For the sake of an example, let's say that you have a group called designers that need read/write access (including read/write access to newly-created items) to a share point called Projects located on your server at /Volumes/Data/Projects.

    Assign an ACL entry for designers that allows all read, write, and inheritance options for the group. You can do so using the File Sharing section of Server Admin, although that is best done before you have items in the share point (e.g. just on a new, empty share point). If your share point already has files within it, you'll have to propagate permissions, and the best way to do that is by using
    chmod instead of Server Admin.

    In this example, we'll use
    chmod in Terminal to assign read/write permissions with inheritance to all existing items in Projects. Since we're applying inheritance, any new items copied to or created in the Projects share point will also receive these permissions:

    sudo chmod -R +ai "group:designers allow readattr,readextattr,readsecurity,list,search,

    read,execute,writeattr,writeextattr,delete,delete
    child,add_file,addsubdirectory,write,append,

    file
    inherit,directoryinherit" /Volumes/Data/Projects

    Violá! You're set.

    If you'd like, just reply with your paths and group names and we'll make a more relevant example for you! 🙂

    --Gerrit

  2. 0

    kristin.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks Gerrit!

    I thought, because it was such a basic scenario, that I could just use POSIX permissions instead of ACLs. As I'm coming to 10.5 from 10.3, and this worked fine in 10.3, but I now assume only because of the AFP Inherit Permissions from Parent hack (which no longer exists and thus why it's not working now). So, if ACLs solves my problem, then that's perfect!

    So, my next question. As the Share Point is already created and populated with files, I'm going to need to do propagation. Why do I need to do this via Terminal and not in Server Admin? I'll totally take your advice and do it that way, but I'm just curious why using Server Admin/GUI isn't OK?

    Thanks again!!!

    Kristin.

  3. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Kristin:

    You could use Server Admin's Propagate function. The reason why I recommend
    chmod over it is simply because of speed and robustness. I've seen several glitches with Server Admin where it gets stuck changing permissions on deeply-nested paths, items that have long file names, or items that have punctuation or non-Roman characters in their names.

    --Gerrit

  4. 0

    Bill Grutz

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    We too have learned that we need to use ACL's. My problem is that if we use Server Admin to do it all SMB users are disconnected whenever any changes are made. Has anyone else seen this? I have talked to several Apple SE's and they say they no of no one else with this problem. The issue on the command line side is some of the weird characters folks use for folder names. I find it interesting that in years past Apple was bragging about their GUI and now all I hear is to use the command line.

  5. 0

    Gerrit DeWitt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    +The issue on the command line side is some of the weird characters folks use for folder names.+

    This shouldn't be a problem at all. You can escape the folder name or have Terminal do it for you if you just drag the folder from the finder to the Terminal window.

    For example, a folder named: !! •• New Projects/Ideas

    in the share point Designers on the Data disk could be escaped like this:

    *chmod -R -N /Volumes/Data/Designers/!! •• New Projects:Ideas*

    Again, just drag the folder in or use Terminal's autocomplete feature to escape it for you. Most characters (like spaces or the exclamation point) are escaped by preceding them with a backslash ().

    About Server Admin and propagating permissions: I have had similar experiences, which is why I suggest using
    chmod instead.

    --Gerrit