Nginx SSL website failed

Hello colleagues

I have problem creating sub-server with enabled Nginx SSL website. Hop someone can assist.
Create Virtual Server -> Sub-Server (Enable Nginx SSL website on) gives me error:
Creating SSL certificate and private key …
… Nginx SSL website failed! : virtualmin-nginx-ssl::feature_setup failed : Failed to open /home/domain/domains/sub.domain.com/ssl.cert.webmintmp.18254 : Permission denied at …/web-lib-funcs.pl line 1427, line 1.

Note: only this domain gives this error. for other domains it is working fine

virtualmin check-config - Everything is OK

miniserv.error shows:
Use of uninitialized value $_ in pattern match (m//) at /usr/share/webmin/webmin/webmin-lib.pl line 2141.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/webmin/webmin/webmin-lib.pl line 2146.
Use of uninitialized value $_ in pattern match (m//) at /usr/share/webmin/webmin/webmin-lib.pl line 2141.

Hello Tskito,

Check if you have setup attribute lock for the folder with lsattr commant.
Check owner ship and permission against the domain which had the SSL worked