Skip to content

Commit 4487417

Browse files
committed
Fix asset permissions in samson
1 parent c8e2807 commit 4487417

File tree

2 files changed

+14
-12
lines changed
  • docker/samson-deployment/latest/conf/provision/roles/webdevops-samson-deployment/tasks
  • provisioning/samson-deployment/general/provision/roles/webdevops-samson-deployment/tasks

2 files changed

+14
-12
lines changed

docker/samson-deployment/latest/conf/provision/roles/webdevops-samson-deployment/tasks/bootstrap.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
state: link
2929
force: yes
3030

31+
- name: Fix permissions of public and asset directories
32+
command: find /app/public -type d -exec chmod -c 0755 {} \;
33+
3134
- name: Fix permissions of public and asset files
32-
file:
33-
path: "/app/public"
34-
owner: "{{ APPLICATION_USER }}"
35-
group: "{{ APPLICATION_GROUP }}"
36-
mode: u=rwX,g=rX,o=rX
37-
recurse: yes
35+
command: find /app/public -type f -exec chmod -c 0644 {} \;
36+
37+
- name: Fix owner of public and asset files
38+
command: chown -R '{{ APPLICATION_USER }}:{{ APPLICATION_GROUP }}' /app/public
3839

3940
- name: Remove old log directory
4041
file:

provisioning/samson-deployment/general/provision/roles/webdevops-samson-deployment/tasks/bootstrap.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
state: link
2929
force: yes
3030

31+
- name: Fix permissions of public and asset directories
32+
command: find /app/public -type d -exec chmod -c 0755 {} \;
33+
3134
- name: Fix permissions of public and asset files
32-
file:
33-
path: "/app/public"
34-
owner: "{{ APPLICATION_USER }}"
35-
group: "{{ APPLICATION_GROUP }}"
36-
mode: u=rwX,g=rX,o=rX
37-
recurse: yes
35+
command: find /app/public -type f -exec chmod -c 0644 {} \;
36+
37+
- name: Fix owner of public and asset files
38+
command: chown -R '{{ APPLICATION_USER }}:{{ APPLICATION_GROUP }}' /app/public
3839

3940
- name: Remove old log directory
4041
file:

0 commit comments

Comments
 (0)