We only need to reset inheritance

This commit is contained in:
Twangboy 2023-02-14 18:11:24 -07:00 committed by Pedro Algarvio
parent 81293265c1
commit 2a48eb1b76

View file

@ -1046,18 +1046,13 @@ class VM:
description = "Rsync local checkout to VM..."
self.rsync(source, destination, description, rsync_flags)
if self.is_windows:
# Need to set the permissions correctly. Rsync does not
# set correct permissions
# rsync sets very strict file permissions and disables inheritance.
# Need to reset permissions so they inherit from the parent
cmd = ["icacls", remote_path, "/T", "/reset"]
ret = self.run(cmd, capture=True, check=False)
if ret.returncode != 0:
self.ctx.exit(ret.returncode, ret.stderr.strip())
cmd = ["icacls", remote_path, "/grant", "Administrator:(OI)(CI)F", "/T"]
ret = self.run(cmd, capture=True, check=False)
if ret.returncode != 0:
self.ctx.exit(ret.returncode, ret.stderr.strip())
def write_and_upload_dot_env(self, env: dict[str, str]):
if not env:
return