java.io.IOException: Permission denied

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

If the directory ../.foo/bar/ doesn't exist, you can't create a file there, so make sure you create the directory first.

File f = new File("somedirname1/somedirname2/somefilename");
if (!f.getParentFile().exists())
    f.getParentFile().mkdirs();

Solutions on the web

via Atlassian JIRA by Sergey Zhukov, 1 year ago
Permission denied
via Atlassian JIRA by Sergey Zhukov, 1 year ago
Permission denied
via Atlassian JIRA by Knut Wannheden, 1 year ago
Permission denied
via Atlassian JIRA by Knut Wannheden, 1 year ago
Permission denied
via Google Groups by Anthony Shortland, 2 years ago
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Users with the same issue

Once, 3 weeks ago
Once, 1 month ago
Once, 1 month ago
4 times, 2 months ago
Once, 2 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.