java.io.IOException: Permission denied

Atlassian JIRA | Sergey Zhukov | 1 decade ago
  1. 0

    I have this exception on Tomcat's startup. I don't have any problems with file permissions inside /home/confluence. Jun 17, 2004 9:11:06 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:/home/confluence/jakarta-tomcat-5.0.25/conf/Catalina/localhos t/confluence.xml Jun 17, 2004 9:11:09 PM com.atlassian.confluence.setup.ConfluenceSetup copyDefaultShortcuts SEVERE: Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:67) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:286) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:123) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3805) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    Atlassian JIRA | 1 decade ago | Sergey Zhukov
    java.io.IOException: Permission denied
  2. 0

    I have this exception on Tomcat's startup. I don't have any problems with file permissions inside /home/confluence. Jun 17, 2004 9:11:06 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:/home/confluence/jakarta-tomcat-5.0.25/conf/Catalina/localhos t/confluence.xml Jun 17, 2004 9:11:09 PM com.atlassian.confluence.setup.ConfluenceSetup copyDefaultShortcuts SEVERE: Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:67) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:286) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:123) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3805) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    Atlassian JIRA | 1 decade ago | Sergey Zhukov
    java.io.IOException: Permission denied
  3. 0

    The encoding of confluence.cfg.xml is UTF-8. If the site welcome message (corresponding to property "property.sitewelcomemessage" in the file) contains non UTF-8 characters (e.g. "ä", "ö", or "ü") these are not UTF-8 escaped when written to confluence.cfg.xml. This in turn causes Confluence at restart of the application server to overwrite the file with the default configuration and enter the Confluence setup sequence. IOW the old configuration file is lost! The following is printed to the server log: 2004-09-24 11:42:09,700 ERROR [atlassian.confluence.setup.ConfluenceSetup] Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:74) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:313) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:126) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:70) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:29) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at org.dom4j.io.SAXReader.read(SAXReader.java:358) at org.dom4j.io.SAXReader.read(SAXReader.java:261) at bucket.config.xml.AbstractDom4jXmlConfiguration.loadDocument(AbstractDom4jXmlConfiguration.java:67) at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:66) ... 17 more

    Atlassian JIRA | 1 decade ago | Knut Wannheden
    java.io.IOException: Permission denied
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The encoding of confluence.cfg.xml is UTF-8. If the site welcome message (corresponding to property "property.sitewelcomemessage" in the file) contains non UTF-8 characters (e.g. "ä", "ö", or "ü") these are not UTF-8 escaped when written to confluence.cfg.xml. This in turn causes Confluence at restart of the application server to overwrite the file with the default configuration and enter the Confluence setup sequence. IOW the old configuration file is lost! The following is printed to the server log: 2004-09-24 11:42:09,700 ERROR [atlassian.confluence.setup.ConfluenceSetup] Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:74) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:313) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:126) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:70) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:29) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at org.dom4j.io.SAXReader.read(SAXReader.java:358) at org.dom4j.io.SAXReader.read(SAXReader.java:261) at bucket.config.xml.AbstractDom4jXmlConfiguration.loadDocument(AbstractDom4jXmlConfiguration.java:67) at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:66) ... 17 more

    Atlassian JIRA | 1 decade ago | Knut Wannheden
    java.io.IOException: Permission denied
  6. 0

    If, for some reason, the java process running Confluence fails on the creation of an attachment handle the IOException gracefully. The user reporting this had the following stacktrace in their log but the 500 page contained a slightly different error message (see second stacktrace). Note - this is after the attachment upload but during the save to a specific directory in conf. home. 2005-04-28 10:59:11,633 ERROR [atlassian.confluence.pages.AttachmentUtils] Containing folders /opt/confluenceHome/attachments/7576/rms 3.3.2 issues.doc for the attachment rms 3.3.2 issues.doc could not be created Apr 28, 2005 10:59:11 AM com.opensymphony.webwork.dispatcher.ServletDispatcher serviceAction SEVERE: Could not execute action java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:85) at bucket.util.FileUtils.copyFile(FileUtils.java:60) at com.atlassian.confluence.pages.DefaultAttachmentManager.saveNewAttachment(DefaultAttachmentManager.java:41) at com.atlassian.confluence.pages.AbstractAttachmentManager.saveAttachment(AbstractAttachmentManager.java:79) at com.atlassian.confluence.pages.DelegatorAttachmentManager.saveAttachment(DelegatorAttachmentManager.java:70) at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy9.saveAttachment(Unknown Source) java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:85) at bucket.util.FileUtils.copyFile(FileUtils.java:60) at com.atlassian.confluence.pages.DefaultAttachmentManager.saveNewAttachmentVersion(DefaultAttachmentManager.java:50) at com.atlassian.confluence.pages.AbstractAttachmentManager.saveAttachment(AbstractAttachmentManager.java:83) at com.atlassian.confluence.pages.DelegatorAttachmentManager.saveAttachment(DelegatorAttachmentManager.java:70) at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy9.saveAttachment(Unknown Source) at com.atlassian.confluence.pages.actions.AttachFileAction.storeAttachment(AttachFileAction.java:128) at com.atlassian.confluence.pages.actions.AttachFileAction.execute(AttachFileAction.java:82)

    Atlassian JIRA | 1 decade ago | Nick Faiz [OLD]
    java.io.IOException: Permission denied

  1. Kialandei 63 times, last 2 weeks ago
  2. Handemelindo 5 times, last 3 weeks ago
  3. cesarnog 12 times, last 2 months ago
  4. Gatgeagent 2 times, last 3 months ago
  5. 0x60 3 times, last 2 months ago
12 more registered users
32 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    Permission denied

    at java.io.UnixFileSystem.createFileExclusively()
  2. Java RT
    File.createNewFile
    1. java.io.UnixFileSystem.createFileExclusively(Native Method)
    2. java.io.File.createNewFile(File.java:828)
    2 frames
  3. bucket.util
    FileUtils.copyFile
    1. bucket.util.FileUtils.copyFile(FileUtils.java:67)
    1 frame
  4. com.atlassian.confluence
    ConfluenceConfigurationListener.contextInitialized
    1. com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:286)
    2. com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:123)
    3. com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24)
    3 frames
  5. Glassfish Core
    StandardHostDeployer.addChild
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3805)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
    3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    6. org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    6 frames
  6. Java RT
    DelegatingMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3 frames