From f82e80dac6eca01320ea8979d4318997eb6a6118 Mon Sep 17 00:00:00 2001 From: cheko Date: Tue, 23 May 2017 20:31:28 +0200 Subject: [PATCH] Bugfix: Directories in /etc/skel will get users ownership when home dir is created (#24943) * Bugfix: Directories in /etc/skel will get users ownership when home dir is created * Bugfix: Chmod works now recursive for the home dir (cherry picked from commit 0dc5e8bf71279f16c496f124d9e4fbb414a49c9b) --- lib/ansible/modules/system/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 031d10c5468..69a3bb10ddc 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -719,7 +719,7 @@ class User(object): os.chown(path, uid, gid) for root, dirs, files in os.walk(path): for d in dirs: - os.chown(path, uid, gid) + os.chown(os.path.join(root, d), uid, gid) for f in files: os.chown(os.path.join(root, f), uid, gid) except OSError: