403 error for images/videos bigger than 3MB
-
Hi,
I have 2 separate instances of baserow on 2 different cloudron.
Both instances are:
On both I have issue with showing bigger files than 3MB.
It looks like baserow have nginx config which serves files.
https://community.baserow.io/t/image-viewing-permission-denied/4780/4In reality it doesn't allow to view images bigger than 3MB and it throws error 403:
Mar 19 14:43:552024/03/19 13:43:55 [error] 35#35: *18634 open() “/app/data/media/user_files/2kKBfyXwsByu02n0eWzu7NDJ0Xe7uyR8_364e9c032bf8016f6a13ef48f7ee8f7726b94d573631a9d7ae45b88839500906.jpg” failed (13: Permission denied), client: 172.18.0.1, server: , request: “GET /media/user_files/2kKBfyXwsByu02n0eWzu7NDJ0Xe7uyR8_364e9c032bf8016f6a13ef48f7ee8f7726b94d573631a9d7ae45b88839500906.jpg HTTP/1.1”, host: “data.staff.10s.pl”, referrer: “Login // Baserow”
Mar 19 14:43:55172.18.0.1 - - [19/Mar/2024:13:43:55 +0000] “GET /media/user_files/2kKBfyXwsByu02n0eWzu7NDJ0Xe7uyR8_364e9c032bf8016f6a13ef48f7ee8f7726b94d573631a9d7ae45b88839500906.jpg HTTP/1.1” 403 196 “Login // Baserow” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36”Any idea how to configure that to show bigger images ?
-
Seems like people have similar problem with nginx.
https://stackoverflow.com/questions/56059893/nginx-php-fpm-download-size-is-limited-to-3mb -
I made another test on one big file.
Convertered original file ( 5.6 MB ) to the same size jpgs but with different quality.
In result I had files having from 800 kB to 5.6 MB with same resolution.Everything was working fine, until image size is above 3 MB.
It looks like it is issue with nginx configuration of baserow package on cloudron. -
Finally I found the issue.
Problem is solved once I changed big file (bigger than 3MB) ownership from
cloudron
towww-data
.
It is permissions for tmp folder of nginx.All dir used by nginx has ownership
www-data
.cloudron
.When I change them to
cloudron
.cloudron
and restart app, it goes back towww-data
.cloudron
.@girish can you fix that ?
-
So the issue is file permissions then and not the file size it seems. The app's start script does change the ownership of all files to
cloudron.cloudron
at https://git.cloudron.io/cloudron/baserow-app/-/blob/master/start.sh?ref_type=heads#L36In fact no process in this app should use the
www-data
owner. Are you showing the ownership info from the host system or from the webterminal into the app? -
@nebulon I'm showing ownership info from webterminal in the app. The path is
/run
I was checking
/run
path, because nginx is using this path:
https://git.cloudron.io/cloudron/baserow-app/-/blob/master/Dockerfile?ref_type=heads/etc/nginx/sites-enabled/nginx.conf
-
-