Failed to open /etc/webmin/apache/site for writing : Read-only file system

SYSTEM INFORMATION
OS type and version 5.15.0-91-generic #101-Ubuntu
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

All of a sudden, I am getting this error on a server:

Failed to open /etc/webmin/apache/site for writing : Read-only file system

Update 1: Does not seem like a ‘not enough space’ problem…

envy@ns40:~$ sudo df -h
[sudo] password for envy:
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.2G 26M 1.2G 3% /run
/dev/sda2 196G 45G 142G 24% /
tmpfs 5.8G 1.2M 5.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/sda1 1.1G 6.1M 1.1G 1% /boot/efi
/dev/sda3 718G 48G 634G 8% /home
tmpfs 1.2G 76K 1.2G 1% /run/user/144
tmpfs 1.2G 68K 1.2G 1% /run/user/1000
envy@ns40:~$

It’s been a long time since I remember seeing something like this. Is the whole partition being mounted read only? Could be the a disk problem and the OS wants you to do a back up and get if fixed before making things worse by doing writes or any thing else.

Use du to find where the usage is, you still have a bit there / has 45G and /home has 48G. What are you hosting as you have alot of useage.
The error is Read Only at /etc/webmin/apache/site I presume that under /
Use filemananger and check the permission on that file, on my system its only a 2K file and set to 644

what dashboard monitor look like

If its a disk health issue this may help

Dashboard does not load well always, here’s what I have

DNS Server

Similar thing happens to other servers too!

Some du runs :

envy@ns40:/var/log$ sudo du -h | sort -hr | head -10
8.4G    .
5.2G    ./journal
4.1G    ./journal/ba96b36e9d934b3da01fa801920bbb6d.netdata
1.2G    ./journal/ba96b36e9d934b3da01fa801920bbb6d
845M    ./gitlab
675M    ./proftpd
549M    ./letsencrypt
450M    ./gitlab/sidekiq
201M    ./gitlab/gitlab-workhorse
89M     ./gitlab/alertmanager

envy@ns40:/var/log$ cd /home

envy@ns40:/home$ sudo du -h | sort -hr | head -10
sort: cannot create temporary file in '/tmp': Read-only file system
envy@ns40:/home$

Your not root, you user may not have those privileges, let me test.

as a user I see this under dns

image
and that works, do you have more options? or you see nothing.

Could not login as root; could not change/set root passwd.

envy@ns40:~$ sudo passwd root
New password:
Retype new password:
passwd: Authentication token manipulation error
passwd: password unchanged
envy@ns40:~$

Besides, envy has sudo power/privileges.

Tried clicking on MariaDB, this happened:

Failed to open /etc/webmin/mysql/version for writing : Read-only file system

You can’t login to webmin as root?

envy@ns40:~$ sudo passwd root
New password:
Retype new password:
passwd: Authentication token manipulation error
passwd: password unchanged
envy@ns40:~$

You used sudo, sudo normally asks for password and you must of known the password for it to work.

YES. Could not login as root; Because, I could not reset password for root

Yes, I know and entered the correct password sudo/user.

Here, i try to check virtualmin config, error

envy@ns40:~$ sudo virtualmin check-config
Your system has 11.54 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB

[21/Jan/2024:00:02:30 +0000] Require virtualmin-htpasswd/virtual_feature.pl failed : Require apache/apache-lib.pl failed : Failed to open /etc/webmin/apache/site for writing : Read-only file system ../web-lib-funcs.pl (line 10440)  ../web-lib-funcs.pl (line 4185) Compilation failed in require at /usr/share/webmin/virtualmin-htpasswd/virtual_feature.pl line 7.  ../web-lib-funcs.pl (line 4185)
BIND DNS server is installed

Mail server Postfix is installed and configured

Postfix is configured to support per-domain outgoing IP addresses

[21/Jan/2024:00:02:31 +0000] Failed to open /etc/webmin/apache/site for writing : Read-only file system ../web-lib-funcs.pl (line 10440)
Error
-----
Failed to open /etc/webmin/apache/site for writing : Read-only file system ../web-lib-funcs.pl (line 10440)
-----
envy@ns40:~$

root password change (for webmin), try this

I have been running this server as sudoer envy and did not have any problem thus far.

There seems to be some other problem.

You just don’t get the options as a user. This is your system isn’t it?
Can you create new virtual server, normally you are limited to one server if non root.

I tried to reset password for root on cmd line, could not. System has writing problem of some kind.

I have created tens of servers as this user. In fact, everything was/is done as this user; had no problem.

Moreover, nothing comes/appears/happens when I click Virtualmin except the dashboard.

Really, ok not sure you managed that, never run it like that unless its a reseller plan.

can you run this command
https://www.virtualmin.com/documentation/developer/cli/check_config/

P.S. Prob getting away from issue. Check here