Page export to PDF fails if temp folder is a symlink

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 6.13.4, 7.4.0
    • Component/s: Page - Export / Import
    • None
    • 6
    • Severity 3 - Minor
    • 1

      Issue Summary

      If the <Confluence_Home>/temp folder is a symlink to somewhere else PDF exports lead to a Page Not Found error

      Steps to Reproduce

      1. Install Confluence
      2. symlink /temp from inside the home folder to somewhere else like follows,
        lrwxr-xr-x   1 haftab  staff    16 21 Aug 14:20 temp -> /tmp/temp_backup
        
      3. Export a page as PDF

      Expected Results

      The page should be exported and downloaded by the browser

      Actual Results

      Confluence shows a Page Not Found error

      Diagnosis

      Capturing a HAR file will show that PDF export action is redirecting to a URL

              "request": {
                "method": "GET",
                "url": "https://website.com:9443/c740/spaces/flyingpdf/pdfpageexport.action?pageId=5963785",
                "httpVersion": "HTTP/1.1",
      .
              "response": {
                "status": 302,
      .
                "redirectURL": "/c740/download/private/tmp/temp_backup/pdfexport-20200821-210820-1427-5/MS-Page11-210820-1427-6.pdf?contentType=application/pdf",
      

      Though, this redirected URL is not accessible.

          "request": {
                "method": "GET",
                "url": "https://website.com:9443/c740/download/private/tmp/temp_backup/pdfexport-20200821-210820-1427-5/MS-Page11-210820-1427-6.pdf?contentType=application/pdf",
      .
              "response": {
                "status": 404,
      

      Workaround

      The PDF export is still available in the <Confluence_Home>/temp folder and can be fetched manually. Or, symlink should be removed

            Assignee:
            Unassigned
            Reporter:
            Hassan Aftab
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: