Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify the default Attachments Path(Windows 2008 server)?

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

I have recently installed JIRA for the first time on Windows Server 2008. The Attachments Path is currently set as Default Directory [C:\Program Files\Atlassian\Application Data\JIRA\data\attachments]

The machine is configured with a relatively small C:\ drive (OS and application installation directories) and a much larger D:\ drive (intended to hold data). I wish to change the Attachments Path to D:\ProgramData\Atlassian\JIRA\data\attachments.

I believe that the jira-config.properties file is the one I should edit, but I cannot find a reference which describes the relevant property.

Can anyone offer a suggestion?

4 answers

1 accepted

0 votes
Answer accepted
Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

Under the admin section you can change the default path

http://confluence.atlassian.com/display/JIRA040/Enabling+File+Attachments

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

Thankyou for the response. Unfortunately, I do not appear to have the "Specify Custom Directory" box on the Edit Attachment Settings dialog.

I have jira-administrator priveleges. I am able to create a new group (jira-system-administrators), add the JIRA System Administrator permission, and join my usercode to that group. But this has made no difference - the Specify Custom Directory box (shown in the documentation) is not present.

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

Atlassian JIRA (v4.4.4#664-r167664)

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

http://kojira:8080/secure/admin/ViewAttachmentSettings.jspa is the URL. I have only the Use Default Directory and Disable Attachments options available. (I have a screen shot but I don't know how to attach it here - no pun intended)

Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

What version of JIRA are you running?

Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

mm, strange. So what does the screen currently show? Is the URL ending with ViewAttachmentSettings.jspa ?

1 vote
Bruna Griebeler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2014

Hi Dale,

So other customers might have the same question about how to change the attachments path for Jira and Confluence, allow me to post here the asnwer that I've post on our support case:

After version 5.1 of Jira - for security reasons - the ability to change the attachment directory has been removed.

So now, the recommended way is to create a symbolic link from the default attachment path to the target path where you want your attachment to be uploaded.

Please check here for more details: https://confluence.atlassian.com/display/JIRAKB/Changing+The+Attachments+Directory+in+JIRA+4.2+to+JIRA+5.1

In Confluence you may do the same thing (create a symbolic link on the OS) or simply change the <confluence-home>/confluence.cfg.xml file on the following line:

<property name="attachments.dir">${confluenceHome}/attachments</property>

More details here:
https://confluence.atlassian.com/display/CONFKB/How+to+relocate+the+attachments+storage+directory

Since the Attachments have an hierarchy, the folders and subfolders need to be maintained the same to avoid any further problems.

There's no need to use a script for moving the files, however in Confluence, in case you face any problem regarding attachments not being found after changing the path, please perform a Index Rebuild.

Cheers!

0 votes
dbonamie April 25, 2014

I am trying to undo the original configuration done by someone who is now unavailable. I want to point attachments to another drive because it is currently set up on a system drive. Attachments need to be on the data drive. My Jira version is v6.1.2 and my Confluence version is the latest. Any ideas?

0 votes
Colin Goudie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

I recall now something about the new security settings to stop changing the paths for index, attachments etc.. back in 4.1

Here is the link to that info that might help

http://confluence.atlassian.com/display/JIRA041/JIRA+4.1.1+Upgrade+Guide#JIRA411UpgradeGuide-ChangingJIRAsFilePathSettings

David FALLAS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2012

I thought that must be the answer. But, having followed those instructions, I still get the same - no Custom Directory box.

The content of my C:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\jira-application.properties is now (stopped JIRA before the edit, then re-started it before logging back on):

# Do not modify this file unless instructed. It is here to store the location of the JIRA home directory only and is typically written to by the installer.

jira.home = C:\\Program Files\\Atlassian\\Application Data\\JIRA

jira.paths.set.allowed=true

(BTW the url changes from http://kojira:8080/secure/admin/ViewAttachmentSettings.jspa to http://kojira:8080/secure/admin/EditAttachmentSettings!default.jspa when I hit the Edit Configuration button).

Suggest an answer

Log in or Sign up to answer