I've managed to reproduce the issue with LXD:

    lxc delete testvm --force 2>/dev/null || true
    lxc launch ubuntu:26.04 testvm
    until lxc exec testvm -- sh -c 'ls -ld /home/ubuntu 2>/dev/null'; do sleep 
1; done
    lxc exec testvm -- rm -r /home/ubuntu
    lxc exec testvm -- cloud-init clean --logs --reboot
    until lxc exec testvm -- sh -c 'ls -ld /home/ubuntu 2>/dev/null'; do sleep 
1; done

The first ls -ld prints

    drwxr-x--- 2 ubuntu ubuntu 5 Jun  4 11:39 /home/ubuntu

The last ls -ld prints

    drwxr-xr-x 3 root root 3 Jun  4 11:39 /home/ubuntu

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150646

Title:
  Home directory has wrong ownership if the user exists but the home
  directory itself is missing when cloud-init runs on first boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2150646/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to