Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change preserve_permissions to avoid modifying permissions at all #8

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

charliermarsh
Copy link
Member

Summary

Right now, preserve_permissions only affects extended permissions, i.e., non-permission bits (via mode & 0o777). So the suid and such are not retained. However, the read, write, and execute permissions are retained. We don't want that. pip explicitly does not preserve any permissions apart from the executable bit, which we handle out-of-band from the unpack in uv.

@charliermarsh charliermarsh changed the title Change preserve_permissions to avoid modifying permissions at all Change preserve_permissions to avoid modifying permissions at all Feb 3, 2025
@charliermarsh charliermarsh merged commit aa48c71 into main Feb 3, 2025
@charliermarsh charliermarsh deleted the charlie/perms branch February 3, 2025 19:13
charliermarsh added a commit to astral-sh/uv that referenced this pull request Feb 3, 2025
## Summary

As in our zip operation (and like pip), we want to explicitly avoid
setting permissions during unpacking -- apart from setting the
executable bit.

This depends on astral-sh/tokio-tar#8.

Closes #11188.
konstin added a commit that referenced this pull request Feb 4, 2025
Adapt the directory permissions test to the changes made in #8.
konstin added a commit that referenced this pull request Feb 4, 2025
Adapt the directory permissions test to the changes made in
#8, to fix the test suite
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.

2 participants