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
newparent_gid = root_pwent.pw_gid
if parent.startswith(home_folder):
newparent_uid = user_pwent.pw_uid
newparent_gid = user_pwent.pw_gid
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.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1940233
Title:
cloud-init in impish makes /home/ubuntu/.ssh root.root
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1940233/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs