Created a new template /usr/local/hestia/data/templates/web/php-fpm >>> default-new.tpl with addition of: /home/%user%/web/%domain% to php_admin_value[open_basedir] =
Changed /home/user/web/domain/ domain permissions to: 0751
Selected/saved new tpl in panel + ran v-rebuild-web-domain just in case
ISSUE: /home/user/web/domain/ Permissions revert back to 0551
Looks like /usr/local/hestia/func/rebuild.sh line 463 does the reversion. Any work around besides created a sub directory under public_html and assigning that as docroot?
I don’t understand why making /home/user/web/domain/ unwritable improves security. It looks like there is only stats + logs in that dir…
and rebuilt the domain. But the permissions stayed the same. I’m not clear how the underlying hestia code works. So I’m missing something in your instructions. I read your instructions as hestia will autoload that .sh file on domain rebuild. Thanks!
Edit: my cat decided to send the post before I finished it
As far as I know, default-new.sh script will be triggered when saving domain but when rebuilding domain, function rebuild_web_domain_conf (the one which changes perms to 551) is executed after the trigger that executes default-new.sh so you can’t do it with a template script.
Thanks. And yes I didn’t see it before I sent reply.
I poked around the hestia code a little but I couldn’t find where the script gets triggered.
Regardless, unexpected behavior that doesn’t make sense to me; should be same on create AND rebuild. I can see the value in having a script run at domain creation AND having a different script run on domain rebuild if necessary. It seems like an easy thing to implement either way while preserving current functionality. So…
Can we fix that? I’m happy to help… Maybe someone else will chime in.