Is there a way to set up folder permissions in Mac OS Monterey so that all documents placed into the folder have the same permissions assigned to the folder?

I have a Mac Mini running OS 12.6 Monterey that is used as a server in my small office. We have a folder designated as "server" where everyone in the office stores documents accessible to everyone else. Anytime someone places a document into the folder it retains the permissions that it had when it was created on a different computer. As a result, I have to change the permissions several times a day so that all enclosed files have the same permissions as the "server" folder. How do I set up permissions for the "server" folder so that all files placed into the Server folder will automatically have the same permissions as the server folder itself and therefore be accessible to and usable by everyone in the office?

Mac mini 2018 or later

Posted on Oct 21, 2022 8:53 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 21, 2022 9:33 AM

Yes. It is possible by you must use Terminal to add the file_inherit and directory_inherit attributes to the ACL on the parent folder. A quick explanation. There are two types of permissions on macOS; POSIX and ACLs. POSIX permissions do not deliver inheritance. ACLs do, as long as you properly create the ACL. Unfortunately, Apple has avoided correcting this UI big for about three operating systems.


Here is what you can do. Let's make the assumption that your shared folder is located at /Users/Shared/Data and that you have a group called allcompany. If this is the case, and you are using System Preferences Sharing to set permissions, you should have the three POSIX setting visible and then add a forth entry for allcompany. The forth is your ACL.


Ah, but macOS does not properly add inheritance attributes when assigning an ACL in the UI, even when setting Read & Write. To correct this, user Terminal and look at the ACL table using this command (Adjust the path to match your shared folder):


bash
ls -le /Users/Shared/Data


(I switch from zsh to bash as the chmod command below will error in zsh). You should see an output something like this:


drwxr-xr-x+ 2 theowner  wheel  64 Oct 21 12:21 Data
 0: group:allcompany allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity


You will notice that the ACE 0 is missing the file_inherit and directory_inherit rights. You must add them using a command like this:


chmod =a# 0 "allcompany allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /Users/Shared/Data


This explicitly sets ACL 0 to enforce inheritance for children and descendants of the parent folder. Note, this is forcing ACE 0 to equal the right. If you have multiple ACEs on the file, repeat to target each ACE number.


Repeat the ls -le command above to confirm your work.


The final step can be done using System Preferences. The above action sets the ACL on the parent. But since you have existing data, you must propagate the permissions to all enclosed items. To do this, open System Preferences > Sharing. Select File Sharing from the list of services and then right-click on the shared folder. You should see an option in the menu to "Apply Permissions to Enclosed Items." Select that option ad confirm your action. The permissions table will turn light gray while the propagation is taking place. Once your entries turn black, you will know that the propagation is complete.


I've shared this a number of time over the years. Some more elegant than others. Here are some references:


Files & Folders not inheriting ACL pe… - Apple Community


Having inherit/permissions problems on Se… - Apple Community


Files & Folders not inheriting ACL pe… - Apple Community


Hope this is helpful. It can be done but you need to roll up your sleeves to do some extra work.


Reid




7 replies
Question marked as Top-ranking reply

Oct 21, 2022 9:33 AM in response to Kerry Kinkade

Yes. It is possible by you must use Terminal to add the file_inherit and directory_inherit attributes to the ACL on the parent folder. A quick explanation. There are two types of permissions on macOS; POSIX and ACLs. POSIX permissions do not deliver inheritance. ACLs do, as long as you properly create the ACL. Unfortunately, Apple has avoided correcting this UI big for about three operating systems.


Here is what you can do. Let's make the assumption that your shared folder is located at /Users/Shared/Data and that you have a group called allcompany. If this is the case, and you are using System Preferences Sharing to set permissions, you should have the three POSIX setting visible and then add a forth entry for allcompany. The forth is your ACL.


Ah, but macOS does not properly add inheritance attributes when assigning an ACL in the UI, even when setting Read & Write. To correct this, user Terminal and look at the ACL table using this command (Adjust the path to match your shared folder):


bash
ls -le /Users/Shared/Data


(I switch from zsh to bash as the chmod command below will error in zsh). You should see an output something like this:


drwxr-xr-x+ 2 theowner  wheel  64 Oct 21 12:21 Data
 0: group:allcompany allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity


You will notice that the ACE 0 is missing the file_inherit and directory_inherit rights. You must add them using a command like this:


chmod =a# 0 "allcompany allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /Users/Shared/Data


This explicitly sets ACL 0 to enforce inheritance for children and descendants of the parent folder. Note, this is forcing ACE 0 to equal the right. If you have multiple ACEs on the file, repeat to target each ACE number.


Repeat the ls -le command above to confirm your work.


The final step can be done using System Preferences. The above action sets the ACL on the parent. But since you have existing data, you must propagate the permissions to all enclosed items. To do this, open System Preferences > Sharing. Select File Sharing from the list of services and then right-click on the shared folder. You should see an option in the menu to "Apply Permissions to Enclosed Items." Select that option ad confirm your action. The permissions table will turn light gray while the propagation is taking place. Once your entries turn black, you will know that the propagation is complete.


I've shared this a number of time over the years. Some more elegant than others. Here are some references:


Files & Folders not inheriting ACL pe… - Apple Community


Having inherit/permissions problems on Se… - Apple Community


Files & Folders not inheriting ACL pe… - Apple Community


Hope this is helpful. It can be done but you need to roll up your sleeves to do some extra work.


Reid




Oct 21, 2022 9:54 AM in response to Kerry Kinkade

I recommend getting some kind of professional document-management system. Macs simply don't work well with those old-school networks. Macs were never very good with networking to begin with. Then, when Apple found success with mobile devices, they really lost interest in things like network file servers. If permissions is the extent of your problems, then you are doing exceptionally well.


You might be able to solve this problem with centrally managed accounts such as Active Directory, but that's going to be a real can-o-worms.

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.

Is there a way to set up folder permissions in Mac OS Monterey so that all documents placed into the folder have the same permissions assigned to the folder?

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