Opened 11 years ago

Closed 11 years ago

#21380 closed New feature (fixed)

There is no easy way to set permission to directories in collecting static files

Reported by: Vajrasky Kok Owned by: Vajrasky Kok
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is the continuation of ticket #21219. Right now, the files will get permissions from FILE_UPLOAD_PERMISSIONS (unless you subclass the static files storage class and set file_permissions) in collecting static files, but not directories. Directories will not get permission from FILE_UPLOAD_DIRECTORY_PERMISSIONS (or FILE_UPLOAD_FILE_PERMISSIONS).

I suggest that we add feature where the directories in collecting static files will get permission be default from FILE_UPLOAD_DIRECTORY_PERMISSIONS (unless we subclass the static file storage class and set directory_permissions attributes).

Change History (3)

comment:1 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Vajrasky Kok, 11 years ago

Has patch: set
Owner: changed from nobody to Vajrasky Kok
Status: newassigned

This is the PR for this ticket: https://github.com/django/django/pull/1873

comment:3 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 7e2d61a9724644d6d1c7ce9361d9fd5be3e2ab86:

Fixed #21380 -- Added a way to set different permission for static directories.

Previously when collecting static files, the directories would receive permissions
from the global umask. Now the default permission comes from FILE_UPLOAD_DIRECTORY_PERMISSIONS
and there's an option to specify the permissions by subclassing any of the
static files storage classes and setting the directory_permissions_mode parameter.

Note: See TracTickets for help on using tickets.
Back to Top