cancel
Showing results for 
Search instead for 
Did you mean: 

access denied: but user has permission?

targa2000
Champ in-the-making
Champ in-the-making
tried to add content, a .doc word file to a space but error returned, 'Access Denied.  You do not have the appropriate permissions to perform this operation.', but user is part of group that has permission to do this.  The group has Coordinator role for the space.What's going on?

17:57:56,410 UserSmiley Frustratedam ERROR [ui.common.Utils] Failed to create content due to error: 01280022 Fail
ed to execute script 'workspace://SpacesStore/40a09a1f-fa87-42ef-8fd2-d9bdf6e63420': 01280021 Acce
ss Denied.  You do not have the appropriate permissions to perform this operation.
org.alfresco.scripts.ScriptException: 01280022 Failed to execute script 'workspace://SpacesStore/4
0a09a1f-fa87-42ef-8fd2-d9bdf6e63420': 01280021 Access Denied.  You do not have the appropriate per
missions to perform this operation.
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:195)

        at sun.reflect.GeneratedMethodAccessor1015.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:3
04)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Reflective
MethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:149)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(Alway
sProceedMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke
(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:148)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionIn
terceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204
)
        at $Proxy177.executeScript(Unknown Source)
        at org.alfresco.repo.action.executer.ScriptActionExecuter.executeImpl(ScriptActionExecuter
.java:170)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbst
ractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java
:711)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionEx
ecuter.java:72)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbst
ractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java
:711)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648
)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:510)
        at sun.reflect.GeneratedMethodAccessor1018.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:3
04)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Reflective
MethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:149)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(Alway
sProceedMethodInterceptor.java:40)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke
(ExceptionTranslatorMethodInterceptor.java:49)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:148)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionIn
terceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204
)
        at $Proxy25.executeAction(Unknown Source)
        at org.alfresco.repo.rule.RuleServiceImpl.executeRule(RuleServiceImpl.java:1040)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRule(RuleServiceImpl.java:1008)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRulesImpl(RuleServiceImpl.java:979
)
        at org.alfresco.repo.rule.RuleServiceImpl.executePendingRules(RuleServiceImpl.java:952)
        at org.alfresco.repo.rule.RuleTransactionListener.beforeCommit(RuleTransactionListener.jav
a:63)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl
.doBeforeCommit(AlfrescoTransactionSupport.java:744)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl
.doBeforeCommit(AlfrescoTransactionSupport.java:724)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl
.beforeCommit(AlfrescoTransactionSupport.java:680)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCo
mmit(TransactionSynchronizationUtils.java:48)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBefor
eCommit(AbstractPlatformTransactionManager.java:835)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommi
t(AbstractPlatformTransactionManager.java:645)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(Abstr
actPlatformTransactionManager.java:632)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionA
fterReturning(TransactionAspectSupport.java:314)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransact
ion.java:467)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransac
tionHelper.java:349)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:130)
        at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:534)
        at sun.reflect.GeneratedMethodAccessor940.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java
:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecuto
r.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain
.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:20
6)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:11
0)
        at sun.reflect.GeneratedMethodAccessor430.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(Chaining
SubsystemProxyFactory.java:122)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204
)
        at $Proxy161.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain
.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:20
6)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:74)
        at sun.reflect.GeneratedMethodAccessor430.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(Chaining
SubsystemProxyFactory.java:122)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204
)
        at $Proxy161.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain
.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:20
6)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.
java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.repo.security.permissions.AccessDeniedException: 01280021 Access Denied.
You do not have the appropriate permissions to perform this operation.
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke
(ExceptionTranslatorMethodInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:148)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionIn
terceptor.java:106)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204
)
        at $Proxy11.getProperty(Unknown Source)
        at org.alfresco.repo.processor.ScriptServiceImpl.getScriptProcessor(ScriptServiceImpl.java
:350)
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:186)

        … 103 more
Caused by: net.sf.acegisecurity.AccessDeniedException: Access is denied.
        at net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)
        at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSec
urityInterceptor.java:394)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(Meth
odSecurityInterceptor.java:77)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodIn
vocation.java:171)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke
(ExceptionTranslatorMethodInterceptor.java:49)
        … 112 more
4 REPLIES 4

targa2000
Champ in-the-making
Champ in-the-making
invited user directly to space as Collaborator, still same error, cannot add content - access denied.

tejaswini
Champ in-the-making
Champ in-the-making
hi there…
   is there any progress?have u solved the problem????

targa2000
Champ in-the-making
Champ in-the-making
I don't have the error any more.  The error seemed to occur because the folder had a number of scripts firing off of it when content was added.  That seemed to be one of the causes.

nicolasraoul
Star Contributor
Star Contributor
I have experienced the same problem:

I get "Access Denied. You do not have the appropriate permissions to perform this operation."
Here is my ActionHandler:

@Override
public void execute(ExecutionContext context) throws Exception {
  final ExecutionContext finalContext = context;
  RunAsWork<Boolean> work = new RunAsWork<Boolean>() {
    public Boolean doWork() throws Exception {
      doTheWork(finalContext);
      return true;
    }
  };
  AuthenticationUtil.runAs(work, "admin");
}

If I comment the "doTheWork" line, then I don't get the error.

doTheWork creates a file in the current space.
- If I execute it in a space that contains a content rule (transform to PDF in the same space), then error.
- If I execute it in a space that contains no content rule, then no error.

I think the Java code is executed as admin, but the content rule is executed as the user. So if the rule writes something, an error comes.

Hope this helps  Smiley Tongue
Nicolas Raoul