"Read only file system" when uploading #99
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mia/0x0#99
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
This is probably a support question rather than a bug. I have been attempting to host 0x0 on a vps. I am pretty familiar with linux administration but I've never used flask or uwsgi before.
I followed the instructions at https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html and https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html. uwsgi and 0x0 are running and I can browse to the homepage: https://file.sney.ca/. However, when I try to upload a file, this happens:
jesse@bivouac:~/Pictures$ curl -F'file=@doFAZ.png' -Fexpires=24 https://file.sney.ca
<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
And the following is logged on the server:
The nginx server block has
location /up { internal; }
, the dir exists, and the user running uwsgi has rw access to it. I also tried hardcoding the location in config.py but that made no difference, so I changed it back to the default.Using Debian 12 with python 3.11.2-1+b1, flask 2.2.2-3, uwsgi 2.0.21-5.1, nginx 1.22.1-9.
Where do I go from here?
Thanks
You can check whether the systemd unit for uwsgi has any hardening options preventing it from writing to that path.
Ah, yes, that was it, the example systemd unit for uwsgi from the debian package had DynamicUser=yes. Thanks for the tip. I am having a different problem now but I'll open a new issue if I can't figure it out.