Skip to content

Commit 0db62fb

Browse files
Fix layer ownership after extraction
Layers extracted from tar archives preserve root ownership (UID 0), which causes 'Permission denied' errors when the host user tries to access them. Call fix_ownership() after successful layer extraction to ensure cached layers are accessible. Part of rootfs permission issue fix.
1 parent c63d440 commit 0db62fb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

crates/vz-image/src/store.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ impl ImageStore {
398398
Ok(()) => {
399399
// We won the race — write the completion marker.
400400
File::create(&done_marker)?;
401+
// Fix ownership: layers extracted from tar preserve root ownership,
402+
// which causes permission denied when host user tries to access them.
403+
fix_ownership(&destination)?;
401404
}
402405
Err(e) if e.kind() == io::ErrorKind::AlreadyExists => {
403406
// Another thread beat us. Clean up our temp dir and wait for theirs.

0 commit comments

Comments
 (0)