From 7aeab0e60e3284b9ff9b9383379ebee99699355a Mon Sep 17 00:00:00 2001 From: saibotk Date: Thu, 16 Sep 2021 08:09:57 +0200 Subject: [PATCH] vikunja: Fix upload files directory permissions --- roles/vikunja/tasks/main.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/roles/vikunja/tasks/main.yml b/roles/vikunja/tasks/main.yml index 5b6f193..a46eb69 100644 --- a/roles/vikunja/tasks/main.yml +++ b/roles/vikunja/tasks/main.yml @@ -43,13 +43,24 @@ - "{{ vikunja_install_location }}" become: true -- name: Create data directories +- name: Create database directory file: # noqa risky-file-permissions # Container manages permissions on its own path: "{{ item }}" state: directory setype: "container_file_t" with_items: - "{{ vikunja_database_location }}" + become: true + +- name: Create files directory + file: + path: "{{ item }}" + state: directory + mode: '0700' + owner: '1000' + group: '1000' + setype: "container_file_t" + with_items: - "{{ vikunja_api_files_location }}" become: true @@ -70,7 +81,7 @@ src: "config.yml" dest: "{{ vikunja_install_location }}/config.yml" owner: '1000' - group: 'root' + group: '1000' mode: '0600' setype: "container_file_t" selevel: "{{ vikunja_selinux_level }}"