mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
We only need to reset inheritance
This commit is contained in:
parent
81293265c1
commit
2a48eb1b76
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue