Currently we are trying to save a set of data into etc path . And content pages which would eventually read info from that etc path by querying .
I would like move the data to the same path where the content page is . Before i do that , I wanted to know if there is any real advantage of using etc path for storing data ? And in which case does storing the data in etc really come in handy?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Storing in /etc will give access to anonymous user, so it can be easily access without giving additional permissions.
Data can be stored in both the /etc folder and /content folder. /etc folder usually used to supplement business logic.
If the content you are storing is related to authored content, I prefer storing under /content as that also give access to anonymous user but we need to make sure that the content is not getting indexed if not required.
Hi,
Storing in /etc will give access to anonymous user, so it can be easily access without giving additional permissions.
Data can be stored in both the /etc folder and /content folder. /etc folder usually used to supplement business logic.
If the content you are storing is related to authored content, I prefer storing under /content as that also give access to anonymous user but we need to make sure that the content is not getting indexed if not required.
Storing of data in /etc is discouraged since any custom changes may be overwritten by OOTB package installations like service packs or hotfixes. Please refer https://experienceleague.adobe.com/docs/experience-manager-65/deploying/restructuring/repository-res... for more understanding on this.
Look for saving information under /content or /conf
Hi @AEMnewbie
As you have mentioned the data you are storing under /etc will be used by the content page which will be stored under the /content location.
Both /etc and /content will have the anonymous access so from data access prospective you will not have any issue.
Also as per adobe documentation, it's always recommended to keep any custom code in /apps, /content, and /conf.
So I will suggest to keep it under /content for better management as all content will be referred from a single location.
Thanks!
As the others already mentioned, there is the permission issue: When you store your data in /etc and the content referrring to it in /content it's very easy to have different permissions (intentionally or non-intentionally). When using different permissions your rendering code most likely needs to use a service-user to access the data in /etc.
Also it's quite easy to limit direct read-access via dispatcher to /etc while having the default read access to pages in /content.
Other aspects:
* tenancy: it's easier if there is just a single root for each tenant in /content than to have 2 distinct roots for every tenant (both in /content and in /etc).
* accessibility via siteadmin
* and probably many more