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

Add unix permissions #193

Closed

Conversation

believeinlain
Copy link
Contributor

@believeinlain believeinlain commented Nov 9, 2022

Addresses issue #46

  • Added file unix_mode.rs that adds metadata representing the Unix mode bits using std::fs::Permissions and std::os::unix::fs::PermissionsExt (on unix).
  • Added display of the form "rwxrwxrwx" (with set uid, set gid, and sticky bits) to diff and ls commands.
  • Modified tests to work and added tests specifically for the mode display functionality.
  • Still some work to do adding and testing Windows compatibility (the plan is to always store archives with Unix mode bits, but to use a systematic conversion when storing/retrieving files on Windows).
  • Works with old archives by setting the default mode bits to 0o100775, which should ideally be changed, as a more suitable default is 0o664 for files and 0o775 for directories. (I think the 1 in 0o100775 is the inode type, as in file, directory, symlink, etc., but I'm not sure). Regardless, it captures the entire unix mode so it works well on unix-like systems with newer backups.

@believeinlain
Copy link
Contributor Author

Finally got it to pass CI on Windows.

@believeinlain
Copy link
Contributor Author

Incorporated into pull request #194, which addresses all of issue #46

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.

None yet

1 participant