Attachment is disabled after JIRA migrated from Windows to Linux
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.
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.
*Fisheye および Crucible は除く
問題
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:
診断
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
原因
The attachment folder that copied from Windows to Linux doesn't have the correct file system permission.
ソリューション
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
- Jira を起動します。
Restarted JIRA and database caused in restoring the old value back; {{propertyvalue:0}}