• First time NUT user

    From Drew Lawson@21:1/5 to All on Thu Jun 10 03:02:28 2021
    I am trying to set up NUT for the first time (should have been
    running this for years), and running into confusion.

    UPS is an APC SmartUPS, but I don't think I am far enough along for
    it to be a problem.

    Console message on connection is:
    kernel: ugen0.5: <American Power Conversion Back-UPS XS 1000M FW:945.d11 .D USB FW:d11> at usbus0

    So I configured:

    [ups]
    driver = apcsmart
    port = /dev/ugen0.5

    But running as root (su - from tcsh):

    -=-=-=-=-=-=-=-=-
    % /usr/local/etc/rc.d/nut start
    Network UPS Tools - UPS driver controller 2.7.4
    Network UPS Tools - APC Smart protocol driver 3.1 (2.7.4)
    APC command table version 3.1

    Unable to open /dev/ugen0.5: Permission denied

    Current user id: uucp (66)
    Serial port owner: root (0)
    Serial port group: operator (5)
    Mode of port: 0600
    -=-=-=-=-=-=-=-=-=-

    Everything about the port is correct, but I cannot figure out why
    it thinks that the current user is uucp.

    The same happens if I resolve the slink and give port as /dev/usb/0.5.0.

    --
    |Drew Lawson | Mrs. Tweedy! |
    | | The chickens are revolting! |

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Drew Lawson@21:1/5 to Lowell Gilbert on Thu Jun 10 13:12:44 2021
    In article <44r1h9gavw.fsf@be-well.ilk.org>
    Lowell Gilbert <lgusenet@be-well.ilk.org> writes:
    drew@furrfu.invalid (Drew Lawson) writes:

    Everything about the port is correct, but I cannot figure out why
    it thinks that the current user is uucp.

    Because the port is compiled to run as uucp by default.

    Well, that solves the mystery.
    Thanks.

    Don't run it as root. Either give the permissions to uucp, or compile it >(src.conf would be a good place to put that configuration) to use a new, >single-purpose user.

    Or for that matter, you could use apcupsd instead.

    I hadn't heard of apcupsd before. Thanks for the lead. That sounds
    like it may be a simpler way to get what I want (a clean shutdown).


    --
    Drew Lawson | Broke my mind
    | Had no spare
    |

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lowell Gilbert@21:1/5 to Drew Lawson on Thu Jun 10 08:30:27 2021
    drew@furrfu.invalid (Drew Lawson) writes:

    I am trying to set up NUT for the first time (should have been
    running this for years), and running into confusion.

    UPS is an APC SmartUPS, but I don't think I am far enough along for
    it to be a problem.

    Console message on connection is:
    kernel: ugen0.5: <American Power Conversion Back-UPS XS 1000M FW:945.d11 .D USB FW:d11> at usbus0

    So I configured:

    [ups]
    driver = apcsmart
    port = /dev/ugen0.5

    But running as root (su - from tcsh):

    -=-=-=-=-=-=-=-=-
    % /usr/local/etc/rc.d/nut start
    Network UPS Tools - UPS driver controller 2.7.4
    Network UPS Tools - APC Smart protocol driver 3.1 (2.7.4)
    APC command table version 3.1

    Unable to open /dev/ugen0.5: Permission denied

    Current user id: uucp (66)
    Serial port owner: root (0)
    Serial port group: operator (5)
    Mode of port: 0600
    -=-=-=-=-=-=-=-=-=-

    Everything about the port is correct, but I cannot figure out why
    it thinks that the current user is uucp.

    Because the port is compiled to run as uucp by default.

    Don't run it as root. Either give the permissions to uucp, or compile it (src.conf would be a good place to put that configuration) to use a new, single-purpose user.

    Or for that matter, you could use apcupsd instead.

    Be well.
    --
    Lowell Gilbert, embedded/networking software engineer
    http://be-well.ilk.org/~lowell/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)