Yes there's where we introduced the problem. I think we are missing a check in check_create_path() so that directories under the home directory are created as user-owned. Something like:
Maybe we should also check/test how check_create_path() behaves when the user's home directory does not exist, or it is not user-owned and user-readable-and-writable. I'd say that check_create_path() should return False, as it is not this module's duty to create the home directory.
Thanks Christian for filing this.
Yes there's where we introduced the problem. I think we are missing a check in check_create_path() so that directories under the home directory are created as user-owned. Something like:
newparent_uid = root_pwent.pw_uid startswith( home_folder) :
newparent_ uid = user_pwent.pw_uid
newparent_ gid = user_pwent.pw_gid
newparent_gid = root_pwent.pw_gid
if parent.
and then:
util. chownbyid( parent_ folder, newparent_uid, newparent_gid)
Maybe we should also check/test how check_create_path() behaves when the user's home directory does not exist, or it is not user-owned and user-readable- and-writable. I'd say that check_create_path() should return False, as it is not this module's duty to create the home directory.