You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NUT sudo make install creates paths not chown'ed to run-time user accounts #1298
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)?..
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.
Activity
Makefile.am: implement install-as-root [networkupstools#1298]
Makefile.am, configure.ac, NEWS.adoc: implement install-as-root [netw…
Makefile.am: install-as-root: avoid chmod/chown of common OS location…
INSTALL.nut.adoc, docs/config-notes.txt: update with info on `(sudo) …
Makefile.am: install-as-root: separate service-stopping from "make in…
Makefile.am: install-as-root: fix NDE retcode 42 behaviour [networkup…
Makefile.am: install-as-root: update comment [networkupstools#1298]
Makefile.am: install-as-root: SMF: fix path to svcadm [networkupstool…
Merge pull request #2761 from jimklimov/issue-1298
jimklimov commentedon Jan 15, 2025
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.
Makefile.am, configure.ac, NEWS.adoc: implement install-as-root [netw…
Makefile.am, configure.ac, NEWS.adoc: implement install-as-root [netw…
Merge pull request networkupstools#2761 from jimklimov/issue-1298