#32604: File uploads larger than FILE_UPLOAD_MAX_MEMORY_SIZE get wrong unix
group
based on setgid
-----------------------------------------+------------------------
Reporter: Gavin Wahl | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
My MEDIA_ROOT directory has setgid set to force the group of newly created
files. For file uploads less than FILE_UPLOAD_MAX_MEMORY_SIZE, django
creates a file inside MEDIA_ROOT and the group is set as expected. For
larger files, django creates a temporary file in another directory, then
moves it to MEDIA_ROOT. Since the file was created in a temporary
directory, it doesn't get the correct group. I expect uploaded media files
to get the group from MEDIA_ROOT, despite whatever magic django internals
are doing.
This can not be fixed with FILE_UPLOAD_PERMISSIONS, because that only sets
permissions, not the group of the file.
The permissions form of this bug is referenced here: https://github.com
/django-cms/django-filer/issues/1031
--
Ticket URL: <https://code.djangoproject.com/ticket/32604>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.c147308e62fdc444a7d15edf863b47b1%40djangoproject.com.