SAGE 10 Is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s)

Using Sage 10, I created a theme that works on local, but when deployed via Trellis to a production server, it won’t serve, giving this error:

production.ERROR: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/srv/www/:/tmp) {"exception":"[object] (ErrorException(code: 0): is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s):

Disabling open_basedir makes it work, but clearly that’s not what I want to do.

I’m looking for any workaround or any reason why it’s trying to find a file at /, the trace shows it’s happening in save_mod_rewrite_rules - but since this is NGINX, that doesn’t even make sense. At this point, I’m afraid I might need to dump sage altogether if I can’t find a fix.

#1 /srv/www/sitename/releases/20210416065214/web/wp/wp-admin/includes/misc.php(266): is_writable('/')
#2 /srv/www/sitename/releases/20210416065214/web/wp/wp-includes/class-wp-rewrite.php(1869): save_mod_rewrite_rules()
#3 /srv/www/sitename/releases/20210416065214/web/wp/wp-includes/class-wp-hook.php(292): WP_Rewrite->flush_rules(true)
#4 /srv/www/sitename/releases/20210416065214/web/wp/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#5 /srv/www/sitename/releases/20210416065214/web/wp/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#6 /srv/www/sitename/releases/20210416065214/web/wp/wp-settings.php(582): do_action('wp_loaded')
sitename
1 Like

PS, it’s not a plugin issue as this happens with all plugins disabled as well.

This topic was automatically closed after 42 days. New replies are no longer allowed.