From ebdf87c819718b47a6d6b131d7cb50037672933b Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Sun, 4 Dec 2022 15:59:35 +0100 Subject: [PATCH] Fix mediaroot permissions This allows user to upload pictures in TinyMCE editors. The newly created files and directories, under mediaroot/, will allow read access to www-data (nginx) while still being owned by __APP__:__APP__ --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index c5385f4..6534a95 100755 --- a/scripts/install +++ b/scripts/install @@ -94,6 +94,8 @@ mkdir -p "$final_path/mediaroot" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +setfacl -dR -m g:"www-data":rX -m u:$app:rwX "$final_path/mediaroot/" +setfacl -R -m g:"www-data":rX -m u:$app:rwX "$final_path/mediaroot/" #================================================= # NGINX CONFIGURATION