Previously, the fix_permission function was arbitrarily setting the permission 0o644 (rw-r--r--) to files and 0o755 (rwxr-xr-x) to directories. This was done to allow unblob to recurse into directories and read files within them in order to continue the extraction.
However, this pose a problem since unblob users may want to keep the original permissions, such as the executable flag.
We're now applying permission masks to the original permission so that we make sure unblob can work while keeping the permission attributes unblob users want to keep.
We also expanded coverage of fix_permission by covering all possible permissions permutations for files and directories.
Previously, the
fix_permission
function was arbitrarily setting the permission 0o644 (rw-r--r--
) to files and 0o755 (rwxr-xr-x
) to directories. This was done to allow unblob to recurse into directories and read files within them in order to continue the extraction.However, this pose a problem since unblob users may want to keep the original permissions, such as the executable flag.
We're now applying permission masks to the original permission so that we make sure unblob can work while keeping the permission attributes unblob users want to keep.
We also expanded coverage of fix_permission by covering all possible permissions permutations for files and directories.
Related to #645