1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

[fix] Better directories and files permissions.

This commit is contained in:
opi 2014-12-04 11:44:02 +01:00
parent 66d593afe8
commit dee63f93f4
2 changed files with 8 additions and 7 deletions

View file

@ -30,10 +30,10 @@ sudo apt-get install transmission-daemon -y -qq
# Make directories and set rights # Make directories and set rights
sudo mkdir -p /home/yunohost.transmission/{progress,completed} sudo mkdir -p /home/yunohost.transmission/{progress,completed}
sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/
sudo chmod 755 -R /home/yunohost.transmission sudo chown -R debian-transmission:www-data /home/yunohost.transmission/completed
sudo chmod 770 -R /home/yunohost.transmission/{progress,completed} sudo find /home/yunohost.transmission/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done
sudo chown -R www-data /home/yunohost.transmission/completed sudo find /home/yunohost.transmission/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done
# Configure Transmission and reload # Configure Transmission and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json

View file

@ -15,9 +15,10 @@ sudo apt-get install transmission-daemon -y -qq
# Make directories and set rights # Make directories and set rights
sudo mkdir -p /home/yunohost.transmission/{progress,completed} sudo mkdir -p /home/yunohost.transmission/{progress,completed}
sudo chgrp debian-transmission /home/yunohost.transmission/{progress,completed} sudo chown -R debian-transmission:debian-transmission /home/yunohost.transmission/
sudo chmod 755 -R /home/yunohost.transmission sudo chown -R debian-transmission:www-data /home/yunohost.transmission/completed
sudo chmod 770 -R /home/yunohost.transmission/{progress,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 # Configure Transmission and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json sed -i "s@PATHTOCHANGE@$path@g" ../conf/settings.json