linux - ansible file and directory permissions -
trying ansible file/directory permissions work.
in ansible create user:
user: name=testuser shell=/sbin/nologin uid=1234 comment="test user" then try change ownership of file directory:
file: path=/etc/myfile state=directory owner=testuser group=testuser mode=0644 recurse=yes i have tried setting facl file:
acl: name: /var/log/audit/audit.log entity: filebeat etype: user permissions: rx state: present when observing file permissions , facl, appear set correctly. if change shell of test user , login, discover don't have permissions ansible presumably set. keep getting "permission denied" message.
if understand mean, "permission denied" when try accessing directory content, e.g. running ls -l /etc/myfile . right *nix behaviour because setted acces permission mode=0644.
about directories, execute bit allows affected user enter directory, , access files , directories inside.
so, allow testuser going through directory, set @ least mode=0744.
to allow testuser group mode=0754 , allow mode=0755
Comments
Post a Comment