﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29163	When uploading, if file size is greater than the FILE_UPLOAD_MAX_MEMORY_SIZE, the permissions of the file on disk is screwed up.	Jibin	nobody	"I have Nginx+Gunicorn server with Django running on Ubuntu 16.04 LTS. I have a 'media' folder with appropriate ACL and umask setup. When uploading, if file size is less than FILE_UPLOAD_MAX_MEMORY_SIZE  things work  as expected. 


{{{
getfacl sample.ipa
# file: sample.ipa
# owner: nobody
# group: nogroup
user::rw-
group::rwx			#effective:-w-
mask::-w-
other::r--
}}}


But when the file size is larger than FILE_UPLOAD_MAX_MEMORY_SIZE, the permissions get screwed up. See the difference in 'mask' and 'other' permissions. Since 'other' cannot read the file, Django returns ""403 Forbidden""


{{{
getfacl sample.ipa
# file: sample.ipa
# owner: nobody
# group: nogroup
user::rw-
group::rwx			#effective:---
mask::---
other::---
}}}

If you increase FILE_UPLOAD_MAX_MEMORY_SIZE to greater than the actual file size, the issue is solved.

Could be a problem related to TemporaryFileUploadHandler."	Uncategorized	closed	File uploads/storage	2.0	Release blocker	duplicate	TemporaryFileUploadHandler	jibin.john@…	Unreviewed	0	0	0	0	0	0
