Attachment is disabled after JIRA migrated from Windows to Linux

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

After migrating attachments from Windows to Linux, attachments are accessible for the old issues that have been migrated, but no "Attach Files" option under "More" for any issues (old and new issues). On the "Attachment" page, attachment is disabled and clicking on "Update" on "Attachment Setting" page does nothing. 

Clicking on "Update"button does not:

Attachment is disabled:


Environment

Jira Data Center

Diagnosis

Attachment Path

  • Make sure the attachment is placed in the correct directory in Linux; /var/atlassian/application-data/jira/data/attachments

Create Attachment Permission

  • To troubleshoot the no "Attach Files" option under "More" for any issues, use "Permission Helper" to identify the user logged in has the "Create Attachment" permission.

Attachment Values in Database

  • Executed SQL query to obtain value of "jira.option.allowattachments":

    select * from propertynumber where id in (select id from propertyentry where PROPERTY_KEY = 'jira.option.allowattachments');
  • Result return by the query:

    id   | propertyvalue
    -------+---------------
    10613 |             0
    (1 row)
  • Executed SQL queries to update the value:
     

    delete from propertynumber where id in (select id from propertyentry where PROPERTY_KEY = 'jira.option.allowattachments');
    insert into propertynumber values ((select id from propertyentry where PROPERTY_KEY = 'jira.option.allowattachments'), 1)
  • Restarted JIRA and database caused in restoring the old value back; propertyvalue: 0

Cause

The attachment folder that copied from Windows to Linux doesn't have the correct file system permission.

Resolution

  • Stop JIRA.

  • Fix the permissions for the below directories and all of their subdirectories:

    $JIRA_HOME/
    $JIRA_INSTALL/logs
    $JIRA_INSTALL/temp
    $JIRA_INSTALL/work
    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
  • Start JIRA.


Restarted JIRA and database caused in restoring the old value back; {{propertyvalue:0}}
Last modified on Feb 17, 2025

Was this helpful?

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