Hi team,
We get a new requirement from our customer.
we usually apply permission only in folder(root) level based on the security groups and it will be applicable to files(sub pages) as well
but now, we have to apply permission for folders and different permission for files as well.
so we are not sure, how to apply different level permission for folders and files.
Can I get some guidance on this.
AEM version - 6.5.19
Which tool or method are you using to apply permissions?
Views
Replies
Total Likes
Hi,
we are using ACS AEM Commons method for applying permission.
Views
Replies
Total Likes
I recommend using netcentric ac tool for the same. You will have to apply read permissions on folder level and for the children, you can give the necessary permissions needed.
https://github.com/Netcentric/accesscontroltool
Views
Replies
Total Likes
Hi @AnushaAt
AEM OOTB provides the capability to set permissions on both folders and files.
What seems to be the blocker in this case? The tool or the way use set permissions.
Views
Replies
Total Likes
Hi,
we usually apply permission to folders, so it will be applicable to files as well.
but whether can we provide different permission for folders and different level set of permission for files under folder?
we have more than 100 files, if we have to give specific permission for files and folders. we have to give permission for each files right?
Regards,
Anusha
Views
Replies
Total Likes
In JCR, the effective permissions are aggregated, meaning they are a combination of those inherited from the parent and those directly applied to a file, folder, or resource.
Views
Replies
Total Likes
Hi @AnushaAt,
If i understood correctly, you want to set ACLs in more granular level.
You shall consider AC tool/Yaml file approach.
for more details:
https://shinesolutions.com/2018/10/02/managing-user-permissions-in-aem/
https://taradevko.com/aem/aem-ac-tool-manage-groups-users/
with this you shall create separate groups for different levels of content access.
Thanks,
Raju.
Hi,
You can do this out-of-the-box without any additional tools. Keep in mind that using regex with ACLs can help avoid going through each file individually. Please refer to these threads to learn more about ACLs inheritance and evaluation:
https://techrevel.blog/2024/03/04/aem-user-permissions-tips-for-effortless-control/
https://danklco.com/posts/2022-12-3-simple-rules-for-success-with-aem-acls/
Hope this helps
Views
Replies
Total Likes
Hi @AnushaAt
I believe to address the requirement of setting different permissions for folders and files (sub-pages) in AEM 6.5.19, we need a targeted approach that leverages granular Access Control List (ACL) configurations without compromising performance or maintainability. Here's how you can achieve this:
folder-editors
: Permissions for folders.file-editors
: Permissions for files/sub-pages.Navigate to the folder in AEM.
In the Permissions tab of the User Admin console (http://<hostname>:4502/useradmin
folder-editors
group.rep:glob
) to exclude sub-pages/files.Example:
rep:glob = /*
(only applies to folder-level content).Navigate to a representative file under the folder.
For the file-editors
group:
rep:glob
restrictions to exclude the root folder itself.Example:
rep:glob = /*/*
(applies to files only).If you have many folders and files, manually configuring ACLs may be inefficient. Use programmatic or automated approaches:
// Example for setting folder permissions
session.getAccessControlManager().setPolicy(
"/content/my-folder",
accessControlPolicyForFolder
);
// Example for setting file permissions
session.getAccessControlManager().setPolicy(
"/content/my-folder/my-file",
accessControlPolicyForFiles
);
http://<hostname>:4502/security
) to verify effective permissions.rep:glob
restrictions, permissions can be fine-tuned for folders and files independentlyViews
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies