From 7d0e46bc1f69ebe1045ad6b8978fa9149e93820f Mon Sep 17 00:00:00 2001 From: checktheroads Date: Tue, 28 May 2019 12:35:26 -0700 Subject: [PATCH] fixed recursive issue --- manage.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/manage.py b/manage.py index 963530d..113b8b1 100755 --- a/manage.py +++ b/manage.py @@ -181,9 +181,11 @@ def fixpermissions(user, group): try: for root, dirs, files in os.walk(hyperglass_root): for d in dirs: - os.chown(d, uid, gid) + full_path = os.path.join(root, d) + os.chown(full_path, uid, gid) for f in files: - os.chown(f, uid, gid) + full_path = os.path.join(root, f) + os.chown(full_path, uid, gid) os.chown(root, uid, gid) click.secho( "✓ Successfully changed hyperglass/ ownership", fg="green", bold=True @@ -194,9 +196,11 @@ def fixpermissions(user, group): try: for root, dirs, files in os.walk(hyperglass_root): for d in dirs: - os.chmod(d, 0o744) + full_path = os.path.join(root, d) + os.chmod(full_path, 0o744) for f in files: - os.chmod(f, 0o744) + full_path = os.path.join(root, f) + os.chmod(full_path, 0o744) os.chmod(root, 0o744) click.secho( "✓ Successfully changed hyperglass/ permissions", fg="green", bold=True