diff --git a/scripts/install b/scripts/install index c36b120..8306846 100755 --- a/scripts/install +++ b/scripts/install @@ -305,13 +305,15 @@ ynh_multimedia_addaccess $app #================================================= # Fix app ownerships & permissions -chown -R $app: "$final_path" "$datadir" +chown -R $app:www-data "$final_path" +chown -R $app: "$datadir" find $final_path/ -type f -print0 | xargs -0 chmod 0644 find $final_path/ -type d -print0 | xargs -0 chmod 0755 find $datadir/ -type f -print0 | xargs -0 chmod 0640 find $datadir/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$final_path/config/config.php" chmod 755 /home/yunohost.app +chmod 750 $final_path #================================================= # SETUP LOGROTATE diff --git a/scripts/restore b/scripts/restore index 0449f5b..a3067d4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -131,13 +131,15 @@ mkdir -p "$datadir" #================================================= # Fix app ownerships & permissions -chown -R $app: "$final_path" "$datadir" +chown -R $app:www-data "$final_path" +chown -R $app: "$datadir" find $final_path/ -type f -print0 | xargs -0 chmod 0644 find $final_path/ -type d -print0 | xargs -0 chmod 0755 find $datadir/ -type f -print0 | xargs -0 chmod 0640 find $datadir/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$final_path/config/config.php" chmod 755 /home/yunohost.app +chmod 750 $final_path # Iterate over users to extend their home folder permissions - for the external # storage plugin usage - and create relevant Nextcloud directories diff --git a/scripts/upgrade b/scripts/upgrade index 8968143..8dfdcea 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -424,13 +424,15 @@ exec_occ background:cron #================================================= # Fix app ownerships & permissions -chown -R $app: "$final_path" "$datadir" +chown -R $app:www-data "$final_path" +chown -R $app: "$datadir" find $final_path/ -type f -print0 | xargs -0 chmod 0644 find $final_path/ -type d -print0 | xargs -0 chmod 0755 find $datadir/ -type f -print0 | xargs -0 chmod 0640 find $datadir/ -type d -print0 | xargs -0 chmod 0750 chmod 640 "$final_path/config/config.php" chmod 755 /home/yunohost.app +chmod 750 $final_path #================================================= # WARNING ABOUT THIRD-PARTY APPS