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

Store and restore permissions, owner, group #46

Closed
sourcefrog opened this issue Dec 6, 2016 · 6 comments
Closed

Store and restore permissions, owner, group #46

sourcefrog opened this issue Dec 6, 2016 · 6 comments
Labels
type:feature type:format-change issues requiring an archive format change

Comments

@sourcefrog
Copy link
Owner

No description provided.

@sourcefrog sourcefrog added type:feature type:format-change issues requiring an archive format change labels Dec 6, 2016
@sourcefrog sourcefrog added this to the 1.0 format stable milestone Dec 6, 2016
@rbtcollins
Copy link

Were you thinking to store these numerically, or symbollically, or both?

What about extended ACLs, or is that a separate ticket?

@sourcefrog
Copy link
Owner Author

sourcefrog commented Dec 11, 2020 via email

@believeinlain
Copy link
Contributor

Just thought I'd mention here that I'm working on this feature currently, in my fork here: https://github.com/believeinlain/conserve/tree/add-unix-permissions

I have unix permissions working and cargo test -- --include-ignored passes (with tests adapted to verify permissions are being restored correctly). I don't really plan on implementing Windows functionality, as I have no use for it, so the permissions are stored numerically as a u32 in the archive for each entry.

I want to take a look at user and group id before submitting a PR.

For my purposes, I really need it to be able to restore permissions, user, and group properly, but I don't need cross-platform or cross-machine compatibility, so just storing user and group id should be fine.

Trying to make archives work across machines is going to be tricky regardless, since the user id and username are not always consistent. Probably best to introduce user and group as an optional feature.

@sourcefrog
Copy link
Owner Author

sourcefrog commented Oct 20, 2022

@believeinlain great!

I think for more general usage I might want to store usernames rather than UIDs: even restoring to a different Linux machine they can end up accidentally different, even when the same usernames exist... Naively storing the username/group in the index would make the uncompressed index larger, though it should get mopped up by compression.

Just storing unix perms as u32 seems fine.

Maybe there could be an option to store ids vs names...

@believeinlain
Copy link
Contributor

believeinlain commented Nov 9, 2022

I created pull request #193 which stores and restores unix mode bits, based on the code I wrote earlier but cleaned up a bit. It passes all tests on my system but seems to be failing in CI due to the group write permission bit being different than expected - not yet sure how to address that.

I haven't got to storing user or group owner yet but I feel like that's a separate feature from just the mode bits, since they are stored separately.

@believeinlain
Copy link
Contributor

believeinlain commented Nov 10, 2022

PR #194 should address every part of this issue on Unix. Went with storing user and group names as strings for simplicity's sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature type:format-change issues requiring an archive format change
Projects
None yet
Development

No branches or pull requests

3 participants