From 7eb65ed28d91a3dfff5b663a15a991ba8e2e2a72 Mon Sep 17 00:00:00 2001 From: "Jorge E. Gomez" Date: Sat, 18 Jun 2022 23:50:34 -0500 Subject: [PATCH] [FIX] Assigns user and permissions to installation files --- roles/nextcloud/tasks/nc_download.yml | 13 ++++--------- roles/nextcloud/tasks/nc_installation.yml | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/roles/nextcloud/tasks/nc_download.yml b/roles/nextcloud/tasks/nc_download.yml index 30d05db..23ae092 100644 --- a/roles/nextcloud/tasks/nc_download.yml +++ b/roles/nextcloud/tasks/nc_download.yml @@ -4,17 +4,12 @@ name: 'bzip2' state: present -- name: Set permissions for web root folder - file: - path: '{{ nextcloud_webroot }}' - mode: 0750 - recurse: yes - state: directory - owner: 'www-data' - group: 'www-data' - - name: Download and extract Nextcloud unarchive: remote_src: yes src: '{{ nextcloud_full_url }}' dest: '{{ nextcloud_webroot | dirname }}/' + mode: 'u=rwX,g=rX,o-rwx' + owner: 'www-data' + group: 'www-data' + diff --git a/roles/nextcloud/tasks/nc_installation.yml b/roles/nextcloud/tasks/nc_installation.yml index 81b6400..a7ac86c 100644 --- a/roles/nextcloud/tasks/nc_installation.yml +++ b/roles/nextcloud/tasks/nc_installation.yml @@ -7,8 +7,8 @@ - name: Set data folder file: - path: '/var/ncdata' - mode: '0750' + path: /var/ncdata + mode: 0750 state: directory owner: 'www-data' group: 'www-data'