Could not Move or Copy Attachment due to Access is Denied

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When attaching filess to an issue, a java.io.java.io.IOException: Access is denied is thrown and the below error appears in the browser:

The following appears in the atlassian-jira.log:

2012-12-18 23:02:25,573 http-bio-8521-exec-24 WARN admin 1382x390x1 1i6r8ys 0:0:0:0:0:0:0:1 /browse/AM-15 [atlassian.jira.util.AttachmentUtils] Unable to make thumbnail directory C:\JIRA\5.2.1\Home\data\attachments\AM\AM-15\thumbs
2012-12-18 23:02:25,624 http-bio-8521-exec-24 WARN admin 1382x390x1 1i6r8ys 0:0:0:0:0:0:0:1 /browse/AM-15 [jira.issue.thumbnail.DefaultThumbnailManager] Error writing to thumbnail file: C:\JIRA\5.2.1\Home\data\attachments\AM\AM-15\thumbs\_thumb_11800.png
java.io.IOException: File 'C:\JIRA\5.2.1\Home\data\attachments\AM\AM-15\thumbs\_thumb_11800.png' could not be created
	at org.apache.commons.io.FileUtils.openOutputStream(FileUtils.java:175)
	at org.apache.commons.io.FileUtils.touch(FileUtils.java:220)

Cause

The user running JIRA does not have the 'write' permission into the target folder - in this example, C:\JIRA\5.2.1\Home\data\attachments\AM\AM-15\thumbs.

Resolution

  1. Stop JIRA.

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

    $JIRA_HOME/
    $JIRA_INSTALL/
    Expand for Linux instructions...

    These instructions refer to the default user, group & installation paths for JIRA, 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 JIRA.

    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
    Expand for Windows instructions...

    Please refer to this Techotopia documentation for further information.

  3. Remove the contents of the following directory:

    $JIRA_INSTALL/work

    (info) This will be rebuilt when JIRA is restarted.

  4. Start JIRA.

Last modified on Apr 27, 2016

Was this helpful?

Yes
No
Provide feedback about this article

In this section

Powered by Confluence and Scroll Viewport.