diff --git a/scripts/install b/scripts/install index 96846ab..738dbf5 100644 --- a/scripts/install +++ b/scripts/install @@ -30,10 +30,10 @@ sudo apt-get install transmission-daemon -y -qq # Make directories and set rights sudo mkdir -p /home/yunohost.transmission/{progress,completed} -sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} -sudo chmod 755 -R /home/yunohost.transmission -sudo chmod 770 -R /home/yunohost.transmission/{progress,completed} -sudo chown -R www-data /home/yunohost.transmission/completed +sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/ +sudo chown -R debian-transmission:www-data /home/yunohost.transmission/completed +sudo find /home/yunohost.transmission/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done +sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done # Configure Transmission and reload sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json diff --git a/scripts/upgrade b/scripts/upgrade index 7e12052..1219a22 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,9 +15,10 @@ sudo apt-get install transmission-daemon -y -qq # Make directories and set rights sudo mkdir -p /home/yunohost.transmission/{progress,completed} -sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} -sudo chmod 755 -R /home/yunohost.transmission -sudo chmod 770 -R /home/yunohost.transmission/{progress,completed} +sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/ +sudo chown -R debian-transmission:www-data /home/yunohost.transmission/completed +sudo find /home/yunohost.transmission/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done +sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done # Configure Transmission and reload sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json