Opening files using Edit in Office shows a blank file
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
It's possible to integrate Confluence with MS Office. This integration allows us to easily edit files with your MS Office suite via the Edit in Office button. This article treats an issue with this integration.
Environment
This problem was identified in the Confluence server and Data Center version 7.11.0, but it could also affect other versions of Confluence.
Diagnosis
Using the Edit in Office functionality, it shows a blank file in the MS Office application instead of the actual file data. The following error appears in the atlassian-confluence.log
file:
1
2
2021-03-24 16:03:46,381 WARN [http-nio-8090-exec-8] [atlassian.confluence.pages.DefaultAttachmentManager] getAttachmentData Could not find data for attachment: Attachment: test.docx v1 - java.io.FileNotFoundException: /data/confluence/sharedhome/attachments/ver003/111/111/11239111/111/11/120591111/140619111/1 (Permission denied)
-- url: /plugins/servlet/confluence/editinword/120591694/attachments/ocauth/d7b47dfa-c27a-40c6-87a7-2005bddb56e0/
From this piece of log, here's the relevant part:
(Permission denied) error
The path to the file we're trying to open /data/confluence/sharedhome/attachments to apply the solution proposed here
The Edit in Office in action – /plugins/servlet/confluence/editinword/120591694/attachments/ocauth/d7b47dfa-c27a-40c6-87a7-2005bddb56e0/
Cause
Uploading a file in Confluence will store it in its file system inside the attachments folder. This folder requires the correct How to set file system permissions for Confluence. If the permissions aren't set, Confluence will be unable to open the file properly and it will show as a blank file in the Office application.
Solution
Follow the solution proposed in How to set file system permissions for Confluence
Was this helpful?