Nodes Restructuring | Community
Skip to main content
September 7, 2021
Solved

Nodes Restructuring

  • September 7, 2021
  • 4 replies
  • 1272 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ravi_Pampana

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.

4 replies

Ravi_Pampana
Community Advisor
Ravi_PampanaCommunity AdvisorAccepted solution
Community Advisor
September 7, 2021

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.

Shubham_borole
Community Advisor
Community Advisor
September 7, 2021

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-restructuring.html?lang=en for more understanding on this.

Look for saving information under /content or /conf

Asutosh_Jena_
Community Advisor
Community Advisor
September 8, 2021

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.

 

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/restructuring/repository-restructuring.html?lang=en

 

Thanks!

joerghoh
Adobe Employee
Adobe Employee
September 8, 2021

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