Failed to create subdomain: Failed to open $path/.bashrc for writing

I’m seeing an error pop up when some of my users try to create a subdomain and I’m trying to track down the source. The error is:

Failed to create virtual server : Failed to open /home/USERNAME/domains/SUBDOMAIN/.bashrc for writing : No such file or directory at …/ line 1332.

The subdomain is created using my default template and takes files from /etc/template. If I remove .bashrc from that folder, the error moves to a different file which is also in /etc/template.

If I create a new user and add a subdomain to that user I can create the subdomain without issue. I checked permissions on ~/domains/ for both accounts and they’re identical. That said, since runs as root that shouldn’t be an issue.

I’ve googled on this and have reinstalled Virtualmin (current version, running on Gentoo) without seeing a change. Where else can I look to try and fix this?