User not allowed rights "2"' on handle

Issue

When you try to restore or install a package, you receive an error similar to the following:

INFO - [java] java.security.AccessControlException: User 'Amalaowala' not allowed rights '2' on handle /apps/cq/java/com/test/day/freemarker/FreemarkerUtil.java INFO - [java] at com.day.cq.jcr.adapter.UserData.grant(Lcom/day/cq/contentbus/Page;I)V(UserData.java:501) INFO - [java] at com.day.cq.jcr.adapter.TicketAdapter.grant(Lcom/day/cq/contentbus/Page;I)V(TicketAdapter.java:564) INFO - [java] at com.day.cq.jcr.adapter.PageAdapter.startTransaction(Ljava/lang/Object;)Lcom/day/cq/contentbus/Container; (PageAdapter.java:575) INFO - [java] at com.day.cq.jcr.adapter.PageAdapter.startTransaction()Lcom/day/cq/contentbus/Container; (PageAdapter.java:554) INFO - [java] at com.day.cq.jcr.adapter.facade.PageFacade.startTransaction(Ljava/lang/Object;) Lcom/day/cq/contentbus/Container;(PageFacade.java:82) INFO - [java] at com.day.cq.jcr.adapter.facade.PageFacade.startTransaction()Lcom/day/cq/contentbus/Container; (PageFacade.java:69) INFO - [java] at com.day.cq.delivery.DeliveryPageWrapper.startTransaction()Lcom/day/cq/contentbus/Container; (DeliveryPageWrapper.java:264) INFO - [java] at com.day.cq.transform.DurboToPage.apply (Lcom/day/cq/contentbus/Ticket;Ljava/io/InputStream;Ljava/util/HashMap;)Lcom/day/cq/contentbus/Page;(DurboToPage.java:158) INFO - [java] at com.day.cq.contentbus.PackageUtil.unpackPackage (Lcom/day/cq/contentbus/Page;ZLcom/day/cq/contentbus/PackageProgressListener;)V(PackageUtil.java:393) INFO - [java] at com.day.cq.contentbus.PackageUtil.restorePackage (Lcom/day/cq/contentbus/Page;Lcom/day/cq/contentbus/PackageProgressListener;)V(PackageUtil.java:227) INFO - [java] at system.replication.templates.packutil.packutil_354$jsp$Handler.installPackage(Lcom/day/cq/contentbus/Page;) V(packutil_354$jsp.java:156) INFO - [java] at system.replication.templates.packutil.packutil_354$jsp$Handler.handle()V(packutil_354$jsp.java:95)

Solution

Make sure that the user ACL has write access to /apps/cq/java/com/test/day/freemarker/FreemarkerUtil.java.

Additional information

This error occurs when the current user does not have access rights to complete the operation. In this example, it is a restore of a package that the user is missing write access to.

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online