Cannot write to directory /etc/webmin/virtual-server/ Still an issue

That should never happen, unless somehow /etc/webmin/virtual-server/config was corrupted. Specifically, if the unix=1 line is missing.

On one of my systems which was working perfectly, suddenly I was asked to Recheck Configuration. I don’t remember but I may have run that twice due to a failure the first time. Here is what was in the broken config.

virt=1
initsub_template=1
last_letsencrypt_mass_renewal=1658882348
init_template=0
virt6=1
licence_script=
name_max=20
iface=eno4
index_fcols=
display_max=
index_cols=dom,user,owner,users,aliases
name_mode=0
domains_sort=sub
show_lastlogin=0
show_mailsize=0
show_mailuser=1
ip6enabled=1
dns_ip=
defip6=fe80::<with the rest obtained from the active interface>
iface6=
netmask6=
defip=<the correct IPv4 address for the server>
allow_symlinks=0
old_defip6=<same as above>
old_defip=<same as above>
external_ip_cache=<same as defip>
preload_mode=2
mysql=1
postgres=0
mysql_size=huge
status=1
dns=0
group_quotas=
web=0
mail_quotas=
virus=0
webalizer=0
logrotate=3
unix=3
plugins=virtualmin-signup
ftp=0
spam=0
ssl=0
disable=
last_check=1658679936
mail=1
webmin=1
dir=3
plugins_inactive=virtualmin-awstats virtualmin-nginx virtualmin-nginx-ssl virtualmin-vsftpd virtualmin-notes virtualmin-google-analytics virtualmin-init virtualmin-dav virtualmin-registrar virtualmin-git virtualmin-mailrelay virtualmin-signup virtualmin-mailman virtualmin-messageoftheday virtualmin-oracle virtualmin-powerdns virtualmin-htpasswd virtualmin-sqlite virtualmin-disable virtualmin-slavedns virtualmin-styles-oswd virtualmin-styles-openwebdesign virtualmin-svn virtualmin-support virtualmin-iframe
home_quotas=

I was left with a non-functioning Virtualmin. Webmin and web services did not fail.

Same here - today my virtualmin started disconnecting and acting erratically for no apparent reason. Im runing centos 8 on a virtual machine. Just a few test sites running on virtualmin. When I noticed that connection lost kept reoccuring went in to check the Lets Encrypt certificate only to find the tab missing, File Manager gone, and coold no longer save the virtual server. Try to recheck configuration and I get

The status of your system is being checked to ensure that all enabled features are available and properly configured ..
Your system has 5.61 GiB of memory, which is at or above the Virtualmin recommended minimum of 1 GiB
MariaDB 10.5.9 is installed and running
Using network interface ens18 for virtual IPs
IPv6 addresses are available, using interface ens18
Default IPv4 address for virtual servers is 149.56.247.126
Virtualmin could not work out the default IPv6 address for virtual servers on your system. You will need to update either the Network interface for virtual addresses or Default virtual server IP address fields on the module configuration page.
Default IP address is set to 149.56.247.126, which matches the detected external address
Disk quotas have been disabled in the module configuration
Shell for FTP users is not included in /etc/shells, which may prevent FTP access
All commands needed to create and restore backups are installed
The selected package management and update systems are installed
Chroot jails are available
The feature Administration user cannot be disabled, as it is used by the following virtual servers : imatrdev.hostnode.ca vodatestnet.imatr.org testnet.imatr.org test.mychefexpress.com eratosdev.imatr.org mailer.imatr.org iqedtest.imatr.org

   .. your system is not ready for use by Virtualmin

websites are still running but I will need to abandon this server unless someone knows of a fix

Somehow my config file got corrupted. File Explorer and the Let’s Encrypt tab was missing for the websites. I think the corruption happened due to a full disk because of a log file. However, they fix that worked was to go thru the Virtualmin>System Settings>Virtualmin Configuration and go thru and save each page. Then goto the Features and Plugins and make sure there are check boxes in the front for the features you use. All that was checked on mine was Mysql.

A thing to note is ProFTP would not reactivate. It still works on the server, so I do not know what the consequences are. And if you are trying to figure out what to check, use the domain count column and any place that does not have a 0, check.