diff --git a/scripts/install b/scripts/install index 810e201..5281279 100644 --- a/scripts/install +++ b/scripts/install @@ -74,9 +74,10 @@ sudo ln -s "$data_path/uploads" "$final_path/uploads" sudo ln -s "$data_path/thumbs" "$final_path/thumbs" # set permissions -sudo find "$final_path" -type f | xargs sudo chmod 0644 -sudo find "$final_path" -type d | xargs sudo chmod 0755 -sudo find "$data_path" -type d | xargs sudo chmod 0755 +sudo find "$final_path" -type f | xargs sudo chmod 0640 +sudo find "$final_path" -type d | xargs sudo chmod 0750 +sudo find "$data_path" -type d | xargs sudo chmod 0750 +sudo chown -R "$root":"$app" "$final_path" sudo chown -R "$app": "$final_path/private" sudo chown -R "$app": "$data_path/uploads" sudo chown -R "$app": "$data_path/thumbs" diff --git a/scripts/upgrade b/scripts/upgrade index b1fd93f..b94d819 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,10 +74,11 @@ sudo cp -a "$TMPDIR/." "$final_path" sudo rm -R "$TMPDIR" # set permissions -sudo find "$final_path" -type f | xargs sudo chmod 0644 -sudo find "$final_path" -type d | xargs sudo chmod 0755 -sudo find "$data_path" -type f | xargs sudo chmod 0645 -sudo find "$data_path" -type d | xargs sudo chmod 0755 +sudo find "$final_path" -type f | xargs sudo chmod 0640 +sudo find "$final_path" -type d | xargs sudo chmod 0750 +sudo find "$data_path" -type f | xargs sudo chmod 0640 +sudo find "$data_path" -type d | xargs sudo chmod 0750 +sudo chown -R "$root":"$app" "$final_path" sudo chown -R "$app": "$final_path/private" sudo chown -R "$app": "$data_path/uploads" sudo chown -R "$app": "$data_path/thumbs"