[bug] AjaxError: Permission Denied
Closed this issue · 2 comments
Description of the bug
It might be me doing a mistake as i am new here. I can create a share link, and the link works with images (photos), but when i try same with a zip file, I can create the link but not access the zip file from the link. i get ajaxerror permission denied
2024/12/10 14:04:54 HTTP 403 OPTIONS 1.7ms /api/files/cat?path=%2FAUT+NTNU+Norway.zip&share=Gp0hogB
2024/12/10 14:05:33 HTTP 200 POST 0.6ms /report?url=https%3A%2F%2Fstoq.marin.ntnu.no%2Fview%2F%2520NTNU%2520Norway.zip%3Fshare%3DGp0hogB%26nav%3Dfalse&msg=AjaxError%3A%20Permission%20Denied&from=https%3A%2F%2Fstoq.marin.ntnu.no%2Fassets%2Fe35158c%2Flib%2Ferror.js&from.lineNo=3&from.columnNo=9error=Permission%20Denied&
2024/12/10 14:08:18 HTTP 400 GET 0.5ms /.git/config
in other words:
Uncaught AjaxError: Permission Denied
AjaxError https://stoq.marin.ntnu.no/assets/e35158c/lib/error.js:3
processError https://stoq.marin.ntnu.no/assets/e35158c/lib/ajax.js:61
default https://stoq.marin.ntnu.no/assets/e35158c/lib/ajax.js:22
RxJS 32
effect https://stoq.marin.ntnu.no/assets/e35158c/lib/rx.js:10
default https://stoq.marin.ntnu.no/assets/e35158c/pages/viewerpage/application_downloader.js:44
https://stoq.marin.ntnu.no/assets/e35158c/pages/ctrl_viewerpage.js:57
RxJS 34
Step by step instructions to reproduce the bug
I installed filestash and onlyoffice docker containers with docker compose with original yml file. It is connected to s3 storage bucket files/aurlab-test/, i set up htpassword and can log in, see pictures and make a share link and with the share link i see the picture and i can download it.
But with zip files it is different, i can log in and download the zip file (after adding client_max_body_size 5000M; in nginx.conf) but i can not access the zip file from a shared link.
I installed nginx and certbot (not dockerized). and added proxy_pass http://localhost:8334; to location in https server in nginx.conf or sites-enabled.
I checked that state folder in container has right permissions:
-rw-r--r-- 1 filestash filestash 49152 Dec 10 13:45 share.sql
Could permission error be due to the share link having the wrong folder/bucket somehow? But when i log in to filestash I can see and download the file without problems. I also don't know which user filestash uses when sharing a link, maybe filestash user.
Update:
I tried with a different zip file and i could share it with a share link !! :)
I do still get some strange behaviour when uploading some files though, so i can upload some files but not all. But that seems to improve after closing and reopening the web browser.
Uncaught (in promise) TypeError: cleanup is not a function
// feature1: close the queue
onClick(qs($page, `img[alt="close"]`)).pipe(rxjs.tap(async() => {
const cleanup = await animate($page, { time: 200, keyframes: slideYOut(50) });
$content.innerHTML = "";
$page.classList.add("hidden");
updateTotal.reset();
**cleanup();**
})).subscribe();
Thank you for the nice software by the way "-._,-'"
-.,-'"-._,-'"
-.,-'
I am not sure, but possible the problem was that i created the share link and later have done some server changes, and when i requested a new link i got an old link that was no longer valid. But it is only guesswork.