Merged in DCD-640 (pull request #44)

Fixed the set_perms chown operation that was not recursively setting permissions

Approved-by: Dave Chevell <dchevell@atlassian.com>
Approved-by: Steve Smith <ssmith@atlassian.com>
This commit is contained in:
Evan Slaughter 2019-09-09 14:11:09 +00:00
commit ef064d1edb

View File

@ -13,8 +13,12 @@ import jinja2 as j2
logging.basicConfig(level=logging.DEBUG)
def set_perms(path, user, group, mode):
shutil.chown(path, user=user, group=group)
os.chmod(path, mode)
for dirpath, dirnames, filenames in os.walk(path):
shutil.chown(dirpath, user=user, group=group)
os.chmod(dirpath, mode)
for filename in filenames:
shutil.chown(os.path.join(dirpath, filename), user=user, group=group)
os.chmod(os.path.join(dirpath, filename), mode)
# Setup Jinja2 for templating
jenv = j2.Environment(