[Bug 2102028] [NEW] localectl set-locale fails with access denied
Nick Rosbrook
2102028 at bugs.launchpad.net
Tue Mar 11 15:25:20 UTC 2025
Public bug reported:
On plucky, run:
root at plucky:~# localectl set-locale LANG=en_US.UTF-8
Failed to issue method call: Access denied
This is because of /usr/share/dbus-1/system.d/systemd-localed-read-
only.conf shipped in Debian and Ubuntu. This extra policy exists because
of incompatibilities between "Debianisms" like /etc/default/keyboard,
and more widely-adopted configurations like /etc/vconsole.conf.
In the case of locale, though, it seems relatively safe to allow on
Ubuntu systems. We have /etc/default/locale -> /etc/locale.conf, and
systemd-localed uses locale-gen as needed, which is what
locales.postinst does on install. Manual testing indicates that
localectl set-locale and update-locale play well together.
Furthermore, this restriction changes behavior that the desktop relies
on. Until a stronger reason can be demonstrated NOT to allow the
SetLocale dbus API to be used, we should remove the restriction.
** Affects: systemd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2102028
Title:
localectl set-locale fails with access denied
Status in systemd package in Ubuntu:
New
Bug description:
On plucky, run:
root at plucky:~# localectl set-locale LANG=en_US.UTF-8
Failed to issue method call: Access denied
This is because of /usr/share/dbus-1/system.d/systemd-localed-read-
only.conf shipped in Debian and Ubuntu. This extra policy exists
because of incompatibilities between "Debianisms" like
/etc/default/keyboard, and more widely-adopted configurations like
/etc/vconsole.conf.
In the case of locale, though, it seems relatively safe to allow on
Ubuntu systems. We have /etc/default/locale -> /etc/locale.conf, and
systemd-localed uses locale-gen as needed, which is what
locales.postinst does on install. Manual testing indicates that
localectl set-locale and update-locale play well together.
Furthermore, this restriction changes behavior that the desktop relies
on. Until a stronger reason can be demonstrated NOT to allow the
SetLocale dbus API to be used, we should remove the restriction.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2102028/+subscriptions
More information about the foundations-bugs
mailing list