Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jimklimov opened this issue Feb 15, 2022 · 0 comments
Open
Labels
CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) packaging portability We want NUT to build and run everywhere possible service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Milestone

Comments

@jimklimov
Copy link
Member

jimklimov commented Feb 15, 2022

(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)?..

@jimklimov jimklimov added CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug labels Feb 15, 2022
@jimklimov jimklimov added this to the 2.8.1 milestone Apr 24, 2022
@jimklimov jimklimov modified the milestones: 2.8.1, 2.8.2 Jan 22, 2023
@jimklimov jimklimov modified the milestones: 2.8.2, 2.8.3 Apr 4, 2024
@jimklimov jimklimov added packaging portability We want NUT to build and run everywhere possible labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Entries related to continuous integration infrastructure (historically also recipes like Makefiles) packaging portability We want NUT to build and run everywhere possible service/daemon start/stop General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Projects
None yet
Development

No branches or pull requests

1 participant