1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00

Fix permissions: we also need www-data to be able to browse

This commit is contained in:
Alexandre Aubin 2021-05-09 18:25:05 +02:00
parent cdfa2f061f
commit 12a0d94a4f
3 changed files with 10 additions and 4 deletions

View file

@ -131,7 +131,9 @@ fi
chown -R $app: "$final_path"
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:$app "$final_path"
chown root:root "$final_path"
setfacl -m g:$app:r-x "$final_path"
setfacl -m g:www-data:r-x "$final_path"
chmod o-rwx "$final_path"
#=================================================

View file

@ -91,9 +91,11 @@ ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files
chown -R $app: "$final_path"
# Home directory of the user need to be owned by root to allow
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:$app "$final_path"
chown root:root "$final_path"
setfacl -m g:$app:r-x "$final_path"
setfacl -m g:www-data:r-x "$final_path"
chmod o-rwx "$final_path"
#=================================================

View file

@ -192,7 +192,9 @@ fi
chown -R $app: "$final_path"
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:$app "$final_path"
chown root:root "$final_path"
setfacl -m g:$app:r-x "$final_path"
setfacl -m g:www-data:r-x "$final_path"
chmod o-rwx "$final_path"
#=================================================