This bug is believed to be fixed in cloud-init in version 23.1. If this
is still a problem for you, please make a comment and set the state back
to New

Thank you.

** Changed in: cloud-init
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1990513

Title:
  write_files defer not using ownership for new folders

Status in cloud-init:
  Fix Released

Bug description:
  I would like to point out what I consider is a bug.
  If the folder where the file is created exists, the file is created with the 
appropriate ownership. However if it doesn't exists, the file is created with 
the proper ownership while the folder is with root ownership.

  In my case the default user is called ubuntu ;)

  write_files:
    - path: /home/ubuntu/.help/file-in.txt
      content: |
        hi in
      owner: 'ubuntu:ubuntu'
      permissions: '0644'
      defer: true
    - path: /home/ubuntu/file-out.txt
      content: |
        hi out
      owner: 'ubuntu:ubuntu'
      permissions: '0644'
      defer: true

  After running everthing:

  ubuntu@mycomputer:~$ ls -alrt file.out
  -rw-r--r-- 5 ubuntu ubuntu      6 Sep  22 10:44 file-out.txt
  ubuntu@mycomputer:~$ ls -alrt .help
  drwxr-xr-x 3 root   root     4096 Sep  22 2022 .help
  ubuntu@mycomputer:~$ ls -alrt .help/file-in.txt
  -rw-r--r-- 5 ubuntu ubuntu      7 Sep  22 10:44 file-out.txt

  I guess the correct way should be to inherit the ownership for the
  folder as well, unless pointed out in another way.

  What do you think?

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to