Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Fix image root permissions #249

Merged
merged 1 commit into from
Jul 31, 2019

Conversation

praseodym
Copy link
Contributor

The copyKernelToOverlay function will overwrite the overlay directory permissions, causing VMs to be booted with too strict permissions on the root directory (0700 instead of 0755).

Example kernel tarball, note the permissions that get 'extracted' to the overlay root:

> tar tvf /var/lib/firecracker/kernel/6bcef83ba671d8c1/kernel.tar | head -n10
drwx------ root/root         0 2019-07-26 13:00 ./
drwxr-xr-x root/root         0 2019-07-16 21:05 ./boot/
-rw-r--r-- root/root     81286 2019-07-16 21:05 ./boot/config-4.19.47
-rwxr-xr-x root/root  23775472 2019-07-16 21:05 ./boot/vmlinux-4.19.47
lrwxrwxrwx root/root         0 2019-07-16 21:05 ./boot/vmlinux -> /boot/vmlinux-4.19.47

Fixes #240

The copyKernelToOverlay function will overwrite the overlay directory
permissions, causing VMs to be booted with too strict permissions on the
root directory (0700 instead of 0755).
Copy link
Contributor

@luxas luxas left a comment

Choose a reason for hiding this comment

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

Many thanks for the PR @praseodym 💯!
Kudos to both yourself and @DieterReuter for spotting the issue 🏅

LGTM

@luxas luxas added this to the v0.5.0 milestone Jul 31, 2019
@luxas luxas self-assigned this Jul 31, 2019
@luxas luxas added the kind/bug Categorizes issue or PR as related to a bug. label Jul 31, 2019
@luxas luxas merged commit 513064e into weaveworks:master Jul 31, 2019
@praseodym praseodym deleted the fix-image-root-permissions branch August 3, 2019 16:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect privileges on image root
2 participants