macOS Mojave with server 5.7.1file sharing Group permissions problem :-(

hi

i have macOS Mojave with server 5.7.1 on Mac pro(Late 2013).

I'm running an updated server for the latest version.

To my question I did not find an answer through Google ...


I do several tests before moving the server to work.

The test on the server is performed from several computers, mainly from operating system 10.12.


I set up 3 users (A + B + C) and 2 groups (E + F) to check permissions Unfortunately permissions do not work properly.

And there seems to be a problem with the ACL and the permissions do not pass automatically.

The entrance was examined in two situations: AFP + SMB.


for example:

When User A logs on to the server and builds a folder / file, checking permissions on the file from the server is saved to User A and not to the Group Name (Group E).

Group: wheel - Permission: read only

All: everyone - permission: read only.


When user B enters the server and builds a folder / file, checking permissions on the file from the server is saved to user name B and not to the group name (group E).

Group: wheel - Permission: read only

All: everyone - permission: read only.



Arrange permissions through: System Prepernces / File Sharing and manual permissions changes: Apple Premissions to Enclosed Items.

Everything works out ... until the next user change.


I would be happy for help an experienced server user


Best regards

Benny

MacBook Air, macOS Sierra (10.12.6), Macintosh Plus,PB 400Hhz black, PB 867, iMac G3, OSX Server5

Posted on Oct 8, 2018 9:18 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 15, 2019 7:35 PM

Hey guys I found this related information from high sierra server that helped me and it appears to work for keeping inherited permissions.


Firstly enable ACL permissions for SMB shares with the following command.



Sharing modification via terminal to engage ACLs



sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server AclsEnabled -bool YES


Then set up inheritance permissions on the parent holder with the following command. This should recursively go through your share and apply the relevant permissions.



sudo chmod -R +a "group:REPLACE_WITH_YOURGROUP_NAME:allow readattr,writeattr,readextattr,writeextattr,readsecurity,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" REPLACE_WITH_PATH_TO_PARENT_SHARED_FOLDER

118 replies

Jan 22, 2019 9:59 PM in response to ahawkes

I thought I'd tell the whole story on my setup so my success may make more sense:


NOTE: You CANNOT use AFP to share a folder on an APFS formatted drive. My externals are all Mac OS Extended (Journaled) format. I do not share any folders on a startup disk.


I have a client that is a small advertising agency with 8 employees. 5 designers and 3 admins. They all use Apple computers connecting exclusively with AFP, except the accountant who uses a Windows 10 PC. Their old server was a 2009 MacPro running Sierra and Mac OS Server the old fashioned "still works" way. The Mac Pro had two 4TB drives in an Apple RAID inside the machine for storage, and an external USB Archive drive for archives, attached via a USB PCI card. The backup drives are external USB drives as well utilized in a rotating offsite backup. The shares were four folders on the internal raid and one folder on the external Archive drive. The account I use to administer the server is long name Administrator short name administrator.


They just got a new 2018 Mac Mini for a server and an external USB-C Pegasus RAID for main storage. Here's the outline of what I did to set this up as a new server (real names changed to protect the innocent). I didn't migrate any settings from the previous server because setting up 8 users and 5 shares from scratch was easy. I'm going to ignore the backups in this discussion, but don't worry. They're there. :)


  1. I copied all of their main data from the 4TB internal RAID into four folders on the pegasus.
  2. I attached the Archive drive to the mini.
  3. I installed Server 5.7.1
  4. I used Server to create 8 users and two groups: agencystaff and agencyadmin
  5. I added all of the users to the group agencystaff but only the three admins to agencyadmin
  6. I went to System Preferences > Sharing and turned on file sharing.
  7. I clicked Options... and turned on AFP and SMB.
  8. Under Windows File Sharing, I unchecked any user who would never connect using SMB. This required their passwords.
  9. I used the free utility "BatChmod" on each of the respective folders to remove any legacy permissions: On each respective folder, I set Owner to administrator with RWX all checked, Group to agencystaff (or agencyadmin on that share) with RWX checked, then Everyone to RWX all UNchecked. I checked "Change ownership and privs", Unlock, Clear ACLs and Apply to enclosed. I hit apply and waited. This drilled down the entire folder structure changing each file's permissions and cleared out old users and groups from the old server setup.
  10. Back in Sharing, I added each of the 5 folders to the Shared Folders panel in turn.
  11. I gave administrator Read & Write to all shares. I gave Everyone No Access to all shares.
  12. I added the group agencystaff with Read & Write to 4 of the 5 shares
  13. I added the group agencyadmin to the admin share
  14. In my subsequent testing, permissions were not being inherited on new folders. Kristy would create a folder that Ashley could not write to or delete from. And vice versa, etc. This is where all of the cursing and screaming happened. For quite some time. So I researched and eventually arrived at this discussion.
  15. I added what I learned in this forum post to my experience with the Unix command-line to properly use chmod to set up each shared folder with its respective inherited permissions like these examples:
sudo chmod -R +a "group:agencystaff allow readattr,writeattr,readextattr,writeextattr,readsecurity,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Volumes/Promise\ Pegasus/Design\ Jobs


sudo chmod -R +a "group:agencyadmin allow readattr,writeattr,readextattr,writeextattr,readsecurity,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit" /Volumes/Promise\ Pegasus/Admin


Each one took a few minutes to complete. After that, all of my testing worked perfectly. I was able to mount the appropriate drives using afp:// on each user's computer. I created multiple folders on the shares with multiple users on multiple computers and they were all able to properly read and write and delete new and old data.


And more importantly, NO ONE called me the next morning. I had successfully replaced the old server at the same IP address with the exact same share names and permissions, and the end-user couldn't tell the difference except it was faster. All of their aliases worked. All of the "recent documents" opened. All of the InDesign files opened without complaining that image links were broken. Success!


/whew

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

macOS Mojave with server 5.7.1file sharing Group permissions problem :-(

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.