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

backuptar.WriteTarFileFromBackupStream writes tarballs with 0 permission bits #184

Open
TBBle opened this issue Dec 6, 2020 · 0 comments

Comments

@TBBle
Copy link
Contributor

TBBle commented Dec 6, 2020

I noticed during microsoft/hcsshim#901 that when go-winio creates a tar stream from a backup, it never sets the permission bits of the file mode.

I'm not sure if this is a problem. It's probably surprising when the tarballs are used with non-Windows OSes, and I suspect I'll find a workaround for this in, e.g., BuildKit's non-Windows-platform WCOW layer manipulation code, if I go looking.

Base layer WCOW tarballs from MS for Windows do have permissions on files in the tarball, except a couple of top-level directories (Files/, UtilityVM/Files/, and their parents). I haven't checked non-base layers from MS to see if they have the same behaviour as base layers (normal default permissions), or as go-winio (no permissions).

It would be a fairly simple change to backuptar.BasicInfoHeader to implement a default file mode of 0644 and default directory mode of 0755, but I'm not sure if that would have other repercussions or would otherwise be undesirable.

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

No branches or pull requests

1 participant