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: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

 

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:

 

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.zzzzz

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 26, 2016

Was this helpful?

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