Actions in Jira server fails with FileNotFoundException in the Jira logs

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When attempting certain actions within a JIRA application, it will fail within a FileNotFoundException in the Jira logs.

Additionally, it might be impossible to perform any search Jira, and the following error will be thrown in the Jira UI from the search page:

An unknown error occurred while trying to perform a search



The following appears in the atlassian-jira.log; this example was generated when attempting to delete a work log:

2012-08-02 19:08:02,012 http-7777-3 ERROR      [500ErrorPage.jsp] Exception caught in 500 page /opt/atlassian/jira/work/Catalina/localhost/_/org/apache/jsp/secure/views/issue/deleteworklog_jsp.java (Permission denied)
java.io.FileNotFoundException: /opt/atlassian/jira/work/Catalina/localhost/_/org/apache/jsp/secure/views/issue/deleteworklog_jsp.java (Permission denied)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at java.io.FileOutputStream.<init>(Unknown Source)
	at org.apache.jasper.compiler.Compiler.setupContextWriter(Compiler.java:291)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

Cause

JIRA applications don't have the appropriate read/write permissions to the directory or file specified in the exception. This is commonly caused by starting JIRA applications with a different user than is not the same as the one who installed the application, such as root (the default user installed on in Linux is jira). Running it as a different user can modify the permissions of certain directories and files that JIRA applications requires access to run.

Resolution

  1. Stop your JIRA application.

  2. Grant appropriate read/write permissions for the below directories and all of their subdirectories to the user who starting Jira application:

    $JIRA_HOME/
    $JIRA_INSTALL/logs
    $JIRA_INSTALL/temp
    $JIRA_INSTALL/work

    (info) If you're using JIRA applications Data Center, ensure that every node has access to the shared home directory.

    Expand for Linux instructions...

    These instructions refer to the default user, group & installation paths for JIRA applications, as if it were installed using the bundled installer. If you're unsure of what these permissions should be, please consult with your System Administrator and the user who installed the JIRA application.

    sudo chown -R jira:jira /var/atlassian/application-data/jira
    sudo chown -R jira:jira /opt/atlassian/jira/logs
    sudo chown -R jira:jira /opt/atlassian/jira/temp
    sudo chown -R jira:jira /opt/atlassian/jira/work
    chmod -R u=rwx,g=rx,o=rx /var/atlassian/application-data/jira 
    chmod -R u=rwX,g=rX,o=rX /opt/atlassian/jira/logs
    chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/temp
    chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/work

    (info) Repeat the same commands above for the shared home if using JIRA applications Data Center.

    (info) Check the context labels if you're using Podman volumes and SELinux

    Expand for Windows instructions...

    Please refer to this Techotopia documentation for further information.

  3. Start JIRA application.
Last modified on Nov 14, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.