Browse Source

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

pull/64/head
Alexandre Aubin 5 years ago
parent
commit
12a0d94a4f
  1. 4
      scripts/install
  2. 6
      scripts/restore
  3. 4
      scripts/upgrade

4
scripts/install

@ -131,7 +131,9 @@ fi
chown -R $app: "$final_path" chown -R $app: "$final_path"
# Home directory of the user needs to be owned by root to allow # Home directory of the user needs to be owned by root to allow
# SFTP connections # 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" chmod o-rwx "$final_path"
#================================================= #=================================================

6
scripts/restore

@ -91,9 +91,11 @@ ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files # Restore permissions on app files
chown -R $app: "$final_path" 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 # 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" chmod o-rwx "$final_path"
#================================================= #=================================================

4
scripts/upgrade

@ -192,7 +192,9 @@ fi
chown -R $app: "$final_path" chown -R $app: "$final_path"
# Home directory of the user needs to be owned by root to allow # Home directory of the user needs to be owned by root to allow
# SFTP connections # 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" chmod o-rwx "$final_path"
#================================================= #=================================================

Loading…
Cancel
Save