email attachments should be written to different directory


currently email attachment "temp" files get written to where the process is running from. this is not ideal and should be updated to the confluence-home/temp directory.

Freshdesk Tickets

#2128 ( - The attachment feature does not work

Create a Support Ticket


Brendan Patterson
September 30, 2014, 5:49 PM

this version of the AddOn displays the target attachments temp directory

Brendan Patterson
September 30, 2014, 5:47 PM

HI , I have attached a new not yet released version of the AddOn which shows the location of the temp directory it is trying to add temp attachments to when you click "Check EMail" as shown:

please try that out. If that doesn't help us quickly solve the problem I will add a custom configuration to specify the destination.

version 2.3.2 attached to this ticket. Feel free to follow up by sending a note to if that is easier to track.


Gino Rossen
September 26, 2014, 7:17 AM

Maybe some usefull info: our confluence home directory is /appdata/confluence and the main installation is in /opt/atlassian/confluence. Both are on different filesystems.
Confluence is started with the init script which is included in the binary installer and runs under the confluence user (defaults from the binary installer).

Brendan Patterson
September 25, 2014, 4:03 PM

Thank you for trying that out and for the helpful stack trace. It looks like you've identified the problem that the AddOn is having trouble writing the file to the temp directory and getting permission denied. I wonder if it is accidentally trying to write the file somewhere else. In my tests it did write to the correct location, but that is the only thing I can think of - for some reason Confluence might not be handing back the Confluence home directory.

Let me add a statement so we can determine where it is trying to write to and I'll look to see if there is another way to ask for the Confluence home directory. Ultimately I could make the destination directory configurable but shouldn't have to.

More soon.

Gino Rossen
September 25, 2014, 7:18 AM


OS: Linux (RHEL 6.5)
Confluence v5.5.3 (installed by the binary installer)
after updating the plugin to v2.3.1 and restarting confluence we are still having problems. If there is no attachment the confluence page gets created, but when there is an attachment, no page gets created and we still have the permissions error:

(the confluence_home/temp directory exsists and is writeable by the confluence user, other plugins such as scrollpdf are able to create temporary files in this directory)

biz.artemissoftware.confluence.sendemailtopage.EMailCheck.handlePart( 2014-09-25 09:05:01,159 [scheduler_Worker-2] ERROR Error while saving attachment: m2pAddOn-canDelete-attachment-14116287011570.obj (Permission denied) m2pAddOn-canDelete-attachment-14116287011570.obj (Permission denied)
at Method)
at<init>(Unknown Source)
at<init>(Unknown Source)
at biz.artemissoftware.confluence.sendemailtopage.AttachmentWrapper.sendStreamToFileForLaterRetrieval(
at biz.artemissoftware.confluence.sendemailtopage.EMailCheck.handlePart(
at biz.artemissoftware.confluence.sendemailtopage.EMailCheck.handleMultipart(
at biz.artemissoftware.confluence.sendemailtopage.EMailCheck.parseMessages(
at biz.artemissoftware.confluence.sendemailtopage.EMailCheck.checkEMail(
at biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob.fireEMailCheck(
at biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob.invokeTriggerServlet(
at biz.artemissoftware.confluence.sendemailtopage.SendEMailToPageJob.execute(
at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.execute(
at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$
at org.quartz.simpl.SimpleThreadPool$

Your pinned fields
Click on the next to a field label to start pinning.


Ture Hoefner


Brendan Patterson