You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
1.2 KiB
20 lines
1.2 KiB
4 years ago
|
#!/bin/bash
|
||
|
|
||
|
restorecon -R {{ bookstack_root_dir }}
|
||
|
chown root:root {{ bookstack_root_dir }}
|
||
|
chmod 700 {{ bookstack_root_dir }}
|
||
|
setfacl -k -b {{ bookstack_root_dir }}
|
||
|
setfacl -m u:{{ bookstack_php_user | default('apache') }}:rx,u:{{ httpd_user | default('apache') }}:x {{ bookstack_root_dir }}
|
||
|
find {{ bookstack_root_dir }}/app -type f -exec chmod 644 "{}" \;
|
||
|
find {{ bookstack_root_dir }}/app -type d -exec chmod 755 "{}" \;
|
||
|
chown root:{{ bookstack_php_user }} {{ bookstack_root_dir }}/app/.env
|
||
|
chmod 640 {{ bookstack_root_dir }}/app/.env
|
||
|
chown -R {{ bookstack_php_user }} {{ bookstack_root_dir }}/app/bootstrap/cache
|
||
|
chmod 700 {{ bookstack_root_dir }}/app/bootstrap/cache
|
||
|
chown -R {{ bookstack_php_user }} {{ bookstack_root_dir }}/data
|
||
|
chmod 700 {{ bookstack_root_dir }}/data
|
||
|
setfacl -m u:{{ httpd_user | default('apache') }}:rx {{ bookstack_root_dir }} {{ bookstack_root_dir }}/app/public
|
||
|
setfacl -m u:{{ httpd_user | default('apache') }}:x {{ bookstack_root_dir }} {{ bookstack_root_dir }}/data/
|
||
|
setfacl -R -m u:{{ httpd_user | default('apache') }}:rx {{ bookstack_root_dir }} {{ bookstack_root_dir }}/data/uploads
|
||
|
find {{ bookstack_root_dir }} -name .htaccess -exec chmod 644 "{}" \;
|