Changes between Version 2 and Version 3 of Ticket #30807, comment 3
- Timestamp:
- Sep 29, 2019, 5:50:51 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30807, comment 3
v2 v3 1 Looking a bit deeper, I am puzzled by the test setup, that might be hiding a different bug:2 3 1 * The archive has a file called `no_permissions` that is `0o0` (zero permissions) in the archive 4 2 5 3 * The current test assumes the file ends up with something similar to `0o664`, which means rw-rw-r--, so also read/write for group and other. 6 4 7 * The reason this works is because `django.utils.archive.BaseArchive` has a method called `_copy_permissions` that only reflects permissions **if** the file in the archive at least has 0o4 (o wner-read, defined in `stat.S_IROTH`). Because this file has no permissions (also no user read), permissions are not correctly updated to reflect permissions in the archive.5 * The reason this works is because `django.utils.archive.BaseArchive` has a method called `_copy_permissions` that only reflects permissions **if** the file in the archive at least has 0o4 (other-read, defined in `stat.S_IROTH`). Because this file has no permissions (also no user read), permissions are not correctly updated to reflect permissions in the archive. 8 6 9 7 {{{