mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2022-02-15 16:00
This commit is contained in:
18
roles/kimai/templates/perms.sh.j2
Normal file
18
roles/kimai/templates/perms.sh.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
restorecon -R {{ kimai_root_dir }}
|
||||
chown root:root {{ kimai_root_dir }}
|
||||
chown -R root:root {{ kimai_root_dir }}/app/
|
||||
chmod 755 {{ kimai_root_dir }}
|
||||
setfacl -R -k -b {{ kimai_root_dir }}
|
||||
setfacl -m u:{{ kimai_php_user | default('apache') }}:rx,u:{{ httpd_user | default('apache') }}:x {{ kimai_root_dir }}
|
||||
find {{ kimai_root_dir }}/app -type f -exec chmod 644 "{}" \; -type d -exec chmod 755 "{}" \;
|
||||
chown root:{{ kimai_php_user }} {{ kimai_root_dir }}/app/.env {{ kimai_root_dir }}/app/config/packages/local.yaml
|
||||
chmod 640 {{ kimai_root_dir }}/app/.env {{ kimai_root_dir }}/app/config/packages/local.yaml
|
||||
chown -R {{ kimai_php_user }} {{ kimai_root_dir }}/data
|
||||
chmod 700 {{ kimai_root_dir }}/data
|
||||
setfacl -R -m u:{{ httpd_user | default('apache') }}:rX {{ kimai_root_dir }}/app/public
|
||||
find {{ kimai_root_dir }} -name .htaccess -exec chmod 644 "{}" \;
|
||||
|
Reference in New Issue
Block a user