Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user
stevenengland opened this issue · 1 comments
stevenengland commented
Hi there,
when a task as an unpriviliged user and the task is executed with become_user different to root then the following error occurs (applies to this roles task named "create paperlessng venv")
TASK [paperless-ngx : create paperlessng venv] *****************************************************************************************************************************************************************************************************************************fatal: [paperless_ngx]: FAILED! =>
msg: |-
Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: 'A+user:paperlessng:rx:allow'
Try 'chmod --help' for more information.
}). For information on working around this, see https://docs.ansible.com/ansible-core/2.13/user_guide/become.html#risks-of-becoming-an-unprivileged-user
A short workaround on this is to install the "acl" package. But I did not yet investigate the sideeffects of doing so. I don't know yet if this is a good idea to handle this scenario in general.
stevenengland commented
Solved by #27