[GH-ISSUE #165] 403 Forbidden when retrieving a saved thumb #92

Closed
opened 2026-02-26 09:36:16 +03:00 by kerem · 4 comments
Owner

Originally created by @AzeExMachina on GitHub (Jun 6, 2019).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/165

Do you want to request a feature or report a bug?
Help/bug

What is the current behavior?
I cannot retrieve a file with GET (with postman) or curl from onlyoffice docker after creating a thumb.
I can easily create the thumb, the POST command works fine, and I can see the thumb being created by navigating to the /var/lib/onlyoffice/../cache/ folder. I can also do a docker cp from outside and the file is what I expected it to be. When I try to retrieve it however I'm getting 403 error.
POST:

{
    "filetype": "pptx",
    "key": "Khirz6zTPdfd7",
    "permissions":{
    	"download":true
    },
    "outputtype": "png",
    "thumbnail": {
        "aspect": 0,
        "first": true,
        "height": 150,
        "width": 100
    },
    "title": "ppt.pptx",
    "url": "http://documentserver/ppt.pptx"
}

when doing
curl http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png
I'm getting a 403 forbidden response

I have even tried to restart the onlyoffice docker with the mount lib option
docker run -i -t -d -p 81:80 --restart=always -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice onlyoffice/documentserver

Is there something I'm doing wrong?

Host Operating System:
Windows 10

Originally created by @AzeExMachina on GitHub (Jun 6, 2019). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/165 **Do you want to request a *feature* or report a *bug*?** Help/bug **What is the current behavior?** I cannot retrieve a file with GET (with postman) or curl from onlyoffice docker after creating a thumb. I can easily create the thumb, the POST command works fine, and I can see the thumb being created by navigating to the /var/lib/onlyoffice/../cache/ folder. I can also do a docker cp from outside and the file is what I expected it to be. When I try to retrieve it however I'm getting 403 error. POST: ``` { "filetype": "pptx", "key": "Khirz6zTPdfd7", "permissions":{ "download":true }, "outputtype": "png", "thumbnail": { "aspect": 0, "first": true, "height": 150, "width": 100 }, "title": "ppt.pptx", "url": "http://documentserver/ppt.pptx" } ``` when doing `curl http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png` I'm getting a 403 forbidden response I have even tried to restart the onlyoffice docker with the mount lib option `docker run -i -t -d -p 81:80 --restart=always -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice onlyoffice/documentserver` Is there something I'm doing wrong? **Host Operating System:** Windows 10
kerem closed this issue 2026-02-26 09:36:16 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Jun 6, 2019):

Hi, what is full output of post command? It not just link to file, but also some keys like

<?xml version="1.0" encoding="utf-8"?>
<FileResult>
    <FileUrl>http://localhost/cache/files/conv_b7dbadd3-5bd4-44f5-b7a4-4727522e1d3f_zip/output.zip/file.zip?md5=2rX5xBs-jxwJjjumglQN3w&amp;expires=1559815571&amp;disposition=attachment&amp;ooname=output.zip</FileUrl>
    <Percent>100</Percent>
    <EndConvert>True</EndConvert>
</FileResult>
<!-- gh-comment-id:499428655 --> @ShockwaveNN commented on GitHub (Jun 6, 2019): Hi, what is full output of post command? It not just link to file, but also some keys like ``` <?xml version="1.0" encoding="utf-8"?> <FileResult> <FileUrl>http://localhost/cache/files/conv_b7dbadd3-5bd4-44f5-b7a4-4727522e1d3f_zip/output.zip/file.zip?md5=2rX5xBs-jxwJjjumglQN3w&amp;expires=1559815571&amp;disposition=attachment&amp;ooname=output.zip</FileUrl> <Percent>100</Percent> <EndConvert>True</EndConvert> </FileResult> ```
Author
Owner

@AzeExMachina commented on GitHub (Jun 6, 2019):

Hi, this is the output
<?xml version="1.0" encoding="utf-8"?> <FileResult> <FileUrl>http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png/ppt.png?md5=TngnmYQC91Xz9UATIwZxSg==&amp;expires=1559815903&amp;disposition=attachment&amp;ooname=output.png</FileUrl> <Percent>100</Percent> <EndConvert>True</EndConvert> </FileResult>
I've tried doing the get by following that url but it says forbidden still

<!-- gh-comment-id:499431162 --> @AzeExMachina commented on GitHub (Jun 6, 2019): Hi, this is the output `<?xml version="1.0" encoding="utf-8"?> <FileResult> <FileUrl>http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png/ppt.png?md5=TngnmYQC91Xz9UATIwZxSg==&amp;expires=1559815903&amp;disposition=attachment&amp;ooname=output.png</FileUrl> <Percent>100</Percent> <EndConvert>True</EndConvert> </FileResult>` I've tried doing the get by following that url but it says forbidden still
Author
Owner

@ShockwaveNN commented on GitHub (Jun 6, 2019):

@AzeExMachina you also need to replace &amp; to just & for downloading this file by link
So your link will be
http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png/ppt.png?md5=TngnmYQC91Xz9UATIwZxSg==&expires=1559815903&disposition=attachment&ooname=output.png

<!-- gh-comment-id:499439632 --> @ShockwaveNN commented on GitHub (Jun 6, 2019): @AzeExMachina you also need to replace `&amp;` to just `&` for downloading this file by link So your link will be `http://127.0.0.1:81/cache/files/conv_Khirz6zTPdfd7_png/output.png/ppt.png?md5=TngnmYQC91Xz9UATIwZxSg==&expires=1559815903&disposition=attachment&ooname=output.png`
Author
Owner

@AzeExMachina commented on GitHub (Jun 6, 2019):

Aaah, that worked, thanks for the help, closing this for now

<!-- gh-comment-id:499445373 --> @AzeExMachina commented on GitHub (Jun 6, 2019): Aaah, that worked, thanks for the help, closing this for now
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#92
No description provided.