Skip to content

Commit

Permalink
CKAN role: fix storage path permissions
Browse files Browse the repository at this point in the history
This fixes an issue where it was not possible to create new
organizations because of permission issues in the storage path.
  • Loading branch information
stsnel committed Apr 22, 2024
1 parent d5b6548 commit 2dce8dd
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion roles/ckan/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@

- name: Ensure CKAN storage path is present
ansible.builtin.file:
path: "{{ ckan_storage_path }}"
path: "{{ item }}"
state: directory
owner: www-data
group: www-data
mode: "0775"
with_items:
- "{{ ckan_storage_path }}"
- "{{ ckan_storage_path }}/storage"
- "{{ ckan_storage_path }}/webassets"


- name: Install CKAN package
Expand Down Expand Up @@ -344,3 +348,12 @@
minute: "0"
user: root
job: "find /tmp/default/sessions -type f -mtime +1 -delete"


- name: Fix up permissions CKAN storage directory
ansible.builtin.file:
dest: "{{ ckan_storage_path }}"
owner: www-data
group: www-data
mode: "u=rwX,g=rX,o=rX"
recurse: true

0 comments on commit 2dce8dd

Please sign in to comment.