How to change the attachments directory on JIRA

prayuja June 25, 2018

I'm trying to create a symbolic link using this command:  mklink /J C:\path\to\symlink E:\path\to\file . But I'm getting an error as syntax incorrect.

 

2 answers

1 vote
Ollie Guan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 25, 2018
Prashant Mali
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.
June 26, 2018

Hi @prayuja

Syntax  is: 

mklink /J {new link} {target link}

/j for junction and /d for link

basically {new link} is the new link you are going to create, and {target link} is the link's target which is existing directory.

prayuja June 26, 2018

Hi @Ollie Guan,

Thanks for your response. The document says to move jira home directory. But I want to move attachment folder only.

prayuja June 26, 2018

Hi @Prashant Mali,

I tried the same command but getting the error.

0 votes
Yogesh Mude
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.
June 26, 2018

HI @prayuja

Welcome to the community!

The default directory location is the subdirectorydata/attachments of the JIRA home directory.

To be able to change the default path you need to create a symbolic link.

Please see the choose custom attachment path section in the below article.

https://confluence.atlassian.com/adminjiraserver073/configuring-file-attachments-861253987.html?_ga=2.136208177.1818070209.1529988185-338212943.1524643824

prayuja June 26, 2018

Hi @Yogesh Mude,

 

How to change default attachment folder path.

Yogesh Mude
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.
June 26, 2018

HI @prayuja

In Old Jira version, we can be able to changes the attachment from the admin section but now there is no way to change the default path from jira.

To change the path you need to use the Symbolic link as i have mentioned in an earlier comment but this can be done from the operating system, not in Jira.

prayuja June 26, 2018

mklink_err.PNG

Yogesh Mude
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.
June 26, 2018

I think you need to run the command as reverse.

First run the command on Test instance then try it out on production.

mklink /J C:\path\to\symlink E:\path\to\file

Ex : mklink /j <Original_path> <target_path>

Please make a note..It will impact on Jira performance while reading a file/attachement.

Prashant Mali
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.
June 26, 2018

Try with "" for both link and check.

If you still facing same issue then restart your system and check. because it seems like some system issue.

prayuja June 26, 2018

@Yogesh Mude

I tried both the way. Same issue

Suggest an answer

Log in or Sign up to answer