mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Only set www-data as group for webapps
This commit is contained in:
parent
75d7042974
commit
8b8768fd77
1 changed files with 6 additions and 1 deletions
|
@ -258,8 +258,13 @@ _ynh_apply_default_permissions() {
|
|||
then
|
||||
# Files inside should be owned by $app/www-data with rw-r----- (+x for folders or files that already have +x)
|
||||
chmod -R u=rwX,g=r-X,o=--- "$target"
|
||||
local group="$app"
|
||||
# We set the group to www-data because most apps do serve static assets that need to be readable by nginx ...
|
||||
chown -R "$app:www-data" "$target"
|
||||
# The fact that the app is a webapp is infered by the fact that $domain and $path are defined
|
||||
if [[ -n "${domain:-}" ]] && [[ -n "${path:-}" ]] then
|
||||
group="www-data"
|
||||
fi
|
||||
chown -R "$app:$group" "$target"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue