✨ feat(ansible/playbook): Configure les permissions pour cache, logs et media Symfony.
This commit is contained in:
@@ -226,12 +226,15 @@
|
||||
job: "php {{ path }}/bin/console mainframe:cron:sync"
|
||||
state: present
|
||||
|
||||
# Ensure final state of /public/media, if you want 'bot' to own it for uploads
|
||||
- name: Final check for public/media ownership and permissions
|
||||
- name: Set correct permissions for Symfony cache and logs directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ path }}/public/media"
|
||||
path: "{{ item }}"
|
||||
owner: bot
|
||||
group: www-data
|
||||
mode: '0775' # Secure for owner/group write, others read/execute
|
||||
mode: '0775' # rwx for owner and group, rx for others
|
||||
state: directory
|
||||
recurse: yes # Ensure all existing and newly created files also have these permissions
|
||||
recurse: yes # Apply to all contents
|
||||
loop:
|
||||
- "{{ path }}/var/cache"
|
||||
- "{{ path }}/var/log"
|
||||
- "{{ path }}/public/media"
|
||||
|
||||
Reference in New Issue
Block a user