Permissions for the web domain folder

What permissions should be set for the $HOMEDIR/$user/web/$domain folder?

When creating a webdomain, 751 are set.

v-add-web-domain:

# Changing file owner & permission
chown -R $user:$user $HOMEDIR/$user/web/$domain
chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.* $conf
chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
user_exec chmod 751 $HOMEDIR/$user/web/$domain $HOMEDIR/$user/web/$domain/*
user_exec chmod 551 $HOMEDIR/$user/web/$domain/stats $HOMEDIR/$user/web/$domain/logs
user_exec chmod 644 $HOMEDIR/$user/web/$domain/public_*html/*
chown --no-dereference $user:www-data $HOMEDIR/$user/web/$domain/public_*html

After the v-rebuild-web-domains (or after backup restore) the permissions changed to 551.

func/rebuild.sh:

# Set folder permissions
no_symlink_chmod 551   $HOMEDIR/$user/web/$domain \
            $HOMEDIR/$user/web/$domain/stats \
            $HOMEDIR/$user/web/$domain/logs

So which permissions are true, and in which case is it a bug???

See [Bug] Permissions for the $HOMEDIR/$user/web/$domain folder · Issue #2552 · hestiacp/hestiacp · GitHub

1 Like