Make the overlayfs mount point's owners and modes match the underlay.
This fixes sudo in the chroot.
This commit is contained in:
parent
1939d1eda2
commit
964243ffb8
3 changed files with 6 additions and 1 deletions
|
|
@ -20,6 +20,9 @@ class OverlayfsMount():
|
|||
subprocess.check_call(["sudo", "mount", "-t", "overlayfs", "-o",
|
||||
option_string, "overlayfs", self.mount_point],
|
||||
stderr=subprocess.PIPE)
|
||||
for command in ["chmod", "chown"]:
|
||||
subprocess.check_call(["sudo", command, "--reference", lower_dir,
|
||||
mount_point])
|
||||
|
||||
def __repr__(self):
|
||||
return "<OverlayfsMount:%r over %r>" % (self.mount_point,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue