From 050dc891af6fb6e59e980c7a33786277433511f8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 1 Oct 2021 04:23:48 +0200 Subject: [PATCH 1/7] Fix final_dir perms --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index c36b120..357f19d 100755 --- a/scripts/install +++ b/scripts/install @@ -312,6 +312,7 @@ 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 $fina_path #================================================= # SETUP LOGROTATE From 20815ed7f296a6326037b3ac8b2a6facb4d2ecf3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 1 Oct 2021 04:24:53 +0200 Subject: [PATCH 2/7] Fix final_path perms --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 357f19d..be38b06 100755 --- a/scripts/install +++ b/scripts/install @@ -312,7 +312,7 @@ 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 $fina_path +chmod 750 $final_path #================================================= # SETUP LOGROTATE From 4dd63b7c0b7bbb78ab829f2784dfa677b8d93f69 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 1 Oct 2021 04:25:52 +0200 Subject: [PATCH 3/7] Fix final_path perms --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8968143..f03387a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -431,6 +431,7 @@ 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 From 9aaa75b9c45d2952498382056c555c9eb6717107 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 1 Oct 2021 04:26:23 +0200 Subject: [PATCH 4/7] Fix final_path perms --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index 0449f5b..e76ab8d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -138,6 +138,7 @@ 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 From 40e6564a32b76e79e3941e0b803157f910b2851f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Oct 2021 15:25:46 +0200 Subject: [PATCH 5/7] www-data needs access to $final_path --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index be38b06..8306846 100755 --- a/scripts/install +++ b/scripts/install @@ -305,7 +305,8 @@ 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 From 3df321beb13c24817f29708f5d5a15d59c91ca2a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Oct 2021 15:26:31 +0200 Subject: [PATCH 6/7] www-data needs access to final_path --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index f03387a..8dfdcea 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -424,7 +424,8 @@ 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 From aceada3fb9607a0216806504989c3a70b30ce37e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Oct 2021 15:27:04 +0200 Subject: [PATCH 7/7] www-data needs access to final_path --- scripts/restore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index e76ab8d..a3067d4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -131,7 +131,8 @@ 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