fix: ensure permissions for global VHOST file are set to the dokku user on install

This commit is contained in:
Jose Diaz-Gonzalez committed 2022-05-10 12:44:01 -04:00
1 parent 46d733ffe9
commit c68ae008cc
2 files changed
+2

No files matched your search

+1
View File
@@ -111,6 +111,7 @@ dpkg-handling() {
db_get "dokku/hostname" db_get "dokku/hostname"
echo "Setting VHOST contents to $RET" echo "Setting VHOST contents to $RET"
echo "$RET" >"${DOKKU_ROOT}/VHOST" echo "$RET" >"${DOKKU_ROOT}/VHOST"
chown dokku:dokku "${DOKKU_ROOT}/VHOST"
fi fi
fi fi
+1
View File
@@ -34,6 +34,7 @@ domains_setup() {
if [[ -n "$DEFAULT_VHOSTS" ]]; then if [[ -n "$DEFAULT_VHOSTS" ]]; then
dokku_log_info1 "Creating new app virtual host file..." dokku_log_info1 "Creating new app virtual host file..."
echo "$DEFAULT_VHOSTS" >"$APP_VHOST_PATH" echo "$DEFAULT_VHOSTS" >"$APP_VHOST_PATH"
chown "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "$APP_VHOST_PATH"
else else
dokku_log_info2 "Global server virtual host not set, disabling app vhost..." dokku_log_info2 "Global server virtual host not set, disabling app vhost..."
disable_app_vhost "$APP" --no-restart disable_app_vhost "$APP" --no-restart