#32413: File upload permission denied error on large files
-------------------------------------+-------------------------------------
     Reporter:  James Miller         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  File                 |                  Version:  3.1
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by René Fleschenberg):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 We got some more information on IRC. Django calls copystat() at
 https://github.com/django/django/blob/master/django/core/files/move.py#L71
 which, in this specific case, raises PermissionError with EACCES (13).
 Django catches the exception, but reraises it unless errno is EPERM:
 https://github.com/django/django/blob/master/django/core/files/move.py#L76

 I don't know what exactly causes the PermissionError here, or if it would
 be good to also swallow EACCES. James mentioned that SELinux might play a
 role here.

 Looks like this needs more research, but I think we should keep the ticket
 open for now. Since the permissions end up being less restrictive than the
 FILE_UPLOAD_PERMISSIONS setting, this also has security implications.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32413#comment:3>
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/074.a04eb0f55ad89e790f78cb2bd2e42bdd%40djangoproject.com.

Reply via email to