systemd icon indicating copy to clipboard operation
systemd copied to clipboard

Per-user journald configuration

Open dawagner opened this issue 1 month ago • 0 comments

Component

systemd-journald

Is your feature request related to a problem? Please describe

I would like to define a different log retention policy for the system and for each user. The only potential way to do that would be to use logging namespaces but I understand that LogNamespace is only available for system units.

Describe the solution you'd like

Would it be possible to implement this? Either in journald itself or by letting the administrator put a user, as a whole, in a logging namespace? Would https://github.com/systemd/systemd/issues/24589 allow extending LogNamespace to user units?

Describe alternatives you've considered

I'm considering using a privilege escalation mechanism to let users create (security-restricted and running as the calling user and using LogNamespace=) system units (or confexts or portable services) but that seems hacky and dangerous to me. Maybe using a systemd.generator based on user-provided structured files would be acceptable...

The systemd version you checked that didn't have the feature you are asking for

255

dawagner avatar Dec 08 '25 10:12 dawagner