From 5cc733fa0771fa55c4f561e6c09bab563367a9a8 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Sun, 3 Apr 2016 23:46:13 +0200 Subject: [PATCH] Fix permissions update, otherwise getting command line too long for chmod --- scripts/install | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 9a86ac4..31cba03 100644 --- a/scripts/install +++ b/scripts/install @@ -53,8 +53,8 @@ sudo yunohost app setting phpmyadmin admin -v $admin # Files owned by root, www-data can just read echo "Setting permission..." sudo chown -R root: $final_path -sudo find $final_path -type f | xargs sudo chmod 644 -sudo find $final_path -type d | xargs sudo chmod 755 +sudo find $final_path -type f -exec chmod 644 {} \; +sudo find $final_path -type d -exec chmod 755 {} \; # config.inc.php contains sensitive data, restrict its access sudo chown root:www-data $final_path/config.inc.php sudo chmod 640 $final_path/config.inc.php diff --git a/scripts/upgrade b/scripts/upgrade index a905fb2..0d61af0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,8 +49,8 @@ sudo yunohost app setting phpmyadmin admin -v $admin # Files owned by root, www-data can just read echo "Setting permission..." sudo chown -R root: $final_path -sudo find $final_path -type f | xargs sudo chmod 644 -sudo find $final_path -type d | xargs sudo chmod 755 +sudo find $final_path -type f -exec chmod 644 {} \; +sudo find $final_path -type d -exec chmod 755 {} \; # config.inc.php contains sensitive data, restrict its access sudo chown root:www-data $final_path/config.inc.php sudo chmod 640 $final_path/config.inc.php