Skip to content

NUT sudo make install creates paths not chown'ed to run-time user accounts #1298

Closed

Description

@jimklimov

(Related to #1296 and #1297)

Filesystem objects created by plain make install remain owned by the user who made them (unprivileged in test installs to a scratch DESTDIR, root in "custom production" builds). NUT daemons are pre-configured to run as an unprivileged account (nobody:nogroup, nut:nut, etc.) and corresponding paths get that ownership (and chmod access constraints) in package metadata - but not in a plain local installation that bypasses packaging, so e.g. /var/state/ups owned by root:root (and in fact not created by make install) can not house state, pid (#1299) and pipe files for drivers and upsd; the /usr/local/ups/etc is not protected from the world reading it, etc.

Proposed solution: add a recipe like make install-own (depends on install, and separated to avoid conflicts for existing use-cases in dist, packaging, etc.) that would try to apply ownership+permissions according to configure script choices. Or revise if existing install recipe tries to do the right thing but for some reason fails to (without faulting the make call)?..

Activity

  1. added
    CIEntries related to continuous integration infrastructure (here CI = tools + scripts + recipes)
    service/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
    on Feb 15, 2022
  2. added this to the 2.8.1 milestone on Apr 24, 2022
  3. modified the milestones: 2.8.1, 2.8.2 on Jan 22, 2023
  4. modified the milestones: 2.8.2, 2.8.3 on Apr 4, 2024
  5. jimklimov commented on Jan 15, 2025

    @jimklimov
    MemberAuthor

    PR above should solve this, even with service (re)start attempts for a number of platforms. More ideas popped up during that work, delayed to 2.8.4 as it is expected to deal with vanilla/reference packaging recipes - which crosses paths with this issue.

  6. modified the milestones: 2.8.3, 2.8.4 on Jan 15, 2025
  7. added a commit that references this issue on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIEntries related to continuous integration infrastructure (here CI = tools + scripts + recipes)packagingportabilityWe want NUT to build and run everywhere possibleservice/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions