spring-boot:StoredCredential(权限被拒绝)



使用spring-boot,在ubuntu-tomcat上war包。凭证文件打包在resources/credentials/gmail中,但我的邮件服务抛出了以下错误:

"/var/lib/tomcat8/webapps/ROOT/WEB-INF/classes/credentials/gmail/StoredCredential (Permission denied)"

如何修复此错误?

我用apt-get安装了tomcat8,我相信它创建了一个tomcat8用户和组。。。这与文件夹的用户权限有关吗?

编辑:

2015-11-08 12:12:33.245 ERROR 12664 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase   : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        ... 6 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.addServlet(Ljava/lang/String;Ljavax/servlet/Servlet;)Ljavax/servlet/ServletRegistration$Dynamic;
        at org.springframework.boot.context.embedded.ServletRegistrationBean.onStartup(ServletRegistrationBean.java:189)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:221)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:84)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:205)
        at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5170)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 common frames omitted

使用winscp,导航到凭据文件夹,并递归地将(其他)R W X权限应用到文件夹+。tomcat8现在可以访问/编辑里面的凭据文件。

相关内容

  • 没有找到相关文章

最新更新