[Pkg-freeradius-maintainers] Bug#1003286: rlm_counter: Failed to open file /etc/freeradius/3.0/db.daily: Read-only file system

Sven Reissmann sven at 0x80.io
Fri Jan 7 15:56:00 GMT 2022


Package: freeradius
Version: 3.0.21+dfsg-2.2+deb11u1
Severity: normal

Dear Maintainer,

when enabling the freeradius module "counter" (rlm_counter) in freeradius 
3.0.21+dfsg-2.2+deb11u1, the systemd service refuses to start with the
following error message, while at the same time, "freeradius -X" successfully 
starts freeradius in debug mode.

> rlm_counter: Failed to open file /etc/freeradius/3.0/db.daily: Read-only file system

I assume the reason is the following directive in the systemd service:

> # We shouldn't be writing to the configuration directory
> ReadOnlyDirectories=/etc/freeradius/

However, in the module itself (/etc/freeradius/3.0/mods-available/counter),
the default filename for the database is:

> filename = ${db_dir}/db.daily

And in /etc/freeradius/3.0/radius.conf, ${db_dir} is set as:

> raddbdir = /etc/freeradius/3.0
> db_dir = ${raddbdir}


Steps to reproduce:

  * Install freeradius 
    apt install freeradius

  * Enable rlm_counter 
    cd /etc/freeradius/3.0/mods-enabled
    ln -s ../mods-available/counter .

  * Restart freeradius
    systemctl restart freeradius


-- System Information:
Debian Release: 11.2
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-10-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages freeradius depends on:
ii  freeradius-common  3.0.21+dfsg-2.2+deb11u1
ii  freeradius-config  3.0.21+dfsg-2.2+deb11u1
ii  libc6              2.31-13+deb11u2
ii  libcrypt1          1:4.4.18-4
ii  libct4             1.2.3-1
ii  libfreeradius3     3.0.21+dfsg-2.2+deb11u1
ii  libgdbm6           1.19-2
ii  libpam0g           1.4.0-9+deb11u1
ii  libperl5.32        5.32.1-4+deb11u2
ii  libreadline8       8.1-1
ii  libsqlite3-0       3.34.1-3
ii  libssl1.1          1.1.1k-1+deb11u1
ii  libsystemd0        247.3-6
ii  libtalloc2         2.3.1-2+b1
ii  libwbclient0       2:4.13.13+dfsg-1~deb11u2
ii  lsb-base           11.1.0

Versions of packages freeradius recommends:
ii  freeradius-utils  3.0.21+dfsg-2.2+deb11u1

Versions of packages freeradius suggests:
pn  freeradius-krb5        <none>
pn  freeradius-ldap        <none>
pn  freeradius-mysql       <none>
pn  freeradius-postgresql  <none>
pn  freeradius-python3     <none>
pn  snmp                   <none>

-- no debconf information

Best regards,
Sven.



More information about the Pkg-freeradius-maintainers mailing list