Open new-sashok724 opened 3 years ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
The cazy part with permission changes and the file module is that follow is by default true. This leads to ansible trying to change permissions on files that chown/chmod and others would not touch in recursive mode.
In case eg. a user creates a symlink to /etc/passwd in its /home ansibles file module will happily switch the permissions of the symlink destination when trying to fix permissions in the users home.
This default contrary to other standard tools is totally unexpected and can cause severe damage in any case where the task runs with elevated permissions.
Summary
When i try to use
file
module to unset the immutable attribute on all files in directory, Ansible gives an error if there symlinks in the directoryIssue Type
Bug Report
Component Name
file
Ansible Version
Configuration
OS / Environment
Arch Linux x86_64
Steps to Reproduce
Expected Results
Playbook completes without errors, after playbook completion immutable attribute is not set on any files in the directory
Actual Results
Code of Conduct