Skip to content

Fix "Could not copy zip entry … Permission Denied" errors#394

Open
ngsilverman wants to merge 1 commit intokezong:masterfrom
ngsilverman:ns/ziptree-file-permissions
Open

Fix "Could not copy zip entry … Permission Denied" errors#394
ngsilverman wants to merge 1 commit intokezong:masterfrom
ngsilverman:ns/ziptree-file-permissions

Conversation

@ngsilverman
Copy link

On systems where unzipping an archive restores the file permissions, if the original file permissions are too restrictive, the copy task fails.

For example:

Execution failed for task ':module:mergeClassesRelease'.
> Could not copy zip entry …/module/build/intermediates/exploded-aar/androidx.benchmark/benchmark-macro-junit4/1.1.0-rc02/release/classes.jar!META-INF/androidx.benchmark_benchmark-macro-junit4.version to '…/module/build/intermediates/fat-aar/merge_classes/release/META-INF/androidx.benchmark_benchmark-macro-junit4.version'.
   > …/module/build/intermediates/fat-aar/merge_classes/release/META-INF/androidx.benchmark_benchmark-macro-junit4.version (Permission denied)

On systems where unzipping an archive restores the file permissions, if the original file permissions are too restrictive, the copy task fails.
@hmphu
Copy link

hmphu commented Oct 11, 2023

@kezong I got same error "Permission Denied" and this PR seem fixed that. Could you please review and merge the PR and release a new version?

@Legion2
Copy link
Contributor

Legion2 commented Jul 15, 2024

I ran into the same error on mac, will try this patch.

@Undefined-User
Copy link

🤔I think 0644 mask is better than 0755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants