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

[Symlink] Add symlink ownership management. #371

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

stswidwinski
Copy link
Contributor

Context

The tar-rs crate ignores ownership of symlinks, even if .set_preserve_ownerships(true); is invoked. While permissions of symlinks are mostly meaningless on most systems, ownership does dictate the access to symlinks. For instance:

$ mkdir foo 
$ sudo ln -s foo link
$  rm link
rm: link: Permission denied

This PR

In this PR I add the right invocation for symlink ownership change and expand the tests to include directories and symlinks.

@stswidwinski
Copy link
Contributor Author

Hi @alexcrichton, please let me know how I can help release this PR. Happy to provide more information or make changes as needed

Copy link
Owner

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@alexcrichton alexcrichton merged commit f952189 into alexcrichton:main Aug 15, 2024
7 checks passed
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