home / django_tickets / tickets

tickets: 8454

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8454 2008-08-20 19:08:11 2011-09-28 16:12:17 2022-03-06 03:42:19.148943 Accepted closed File uploads/storage     dev fixed uploaded file permissions vary based on handler As mentioned a few times in #2070, uploaded files large enough to be streamed to a temporary file get created with a mode of 0600, as per python's [http://docs.python.org/lib/module-tempfile.html tempfile.mkstemp]. This causes two problems: 1. Files uploaded into memory and saved to disk respect the umask, so uploads could have different permissions based on how big they are. 2. If the webserver user and django user do not match (such as when running an external FastCGI process), the webserver can no longer serve uploaded files. Attached is a patch that implements a `FILE_UPLOAD_PERMISSIONS` setting. Right now, it defaults to the current behavior (leaving the permissions alone). Discussion (or lack thereof) here: http://groups.google.com/group/django-developers/browse_frm/thread/e7d7ca62b9f6d331 The inconsistency seems like a bug to me, so marking as 1.0. nobody dcwatson file upload permission mode 0 1 0 0 0 0
Powered by Datasette · Queries took 1.111ms