mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Using lchown insted of chown.
This commit is contained in:
parent
52b3d986b5
commit
4d1c687cbd
1 changed files with 2 additions and 2 deletions
|
@ -4725,9 +4725,9 @@ def copy(
|
|||
shutil.copytree(source, name, symlinks=True)
|
||||
for root, dirs, files in os.walk(name):
|
||||
for dir_ in dirs:
|
||||
__salt__['file.chown'](os.path.join(root, dir_), user, group)
|
||||
__salt__['file.lchown'](os.path.join(root, dir_), user, group)
|
||||
for file_ in files:
|
||||
__salt__['file.chown'](os.path.join(root, file_), user, group)
|
||||
__salt__['file.lchown'](os.path.join(root, file_), user, group)
|
||||
else:
|
||||
shutil.copy(source, name)
|
||||
ret['changes'] = {name: source}
|
||||
|
|
Loading…
Add table
Reference in a new issue