Coder Social home page Coder Social logo

Comments (11)

sinclairpaul avatar sinclairpaul commented on June 15, 2024 2

I have pushed a fix which should be available on the Edge repo to run as root. I have tested with a USB device which appears to be fine. It would be great if anyone with the issue could validate and test?

from addon-nut.

ben-digitalhive avatar ben-digitalhive commented on June 15, 2024

Has there been any progress on this issue? I am running on a NUC and get this permission issue.

[17:55:54] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 3.8.0-3220-g866b921892
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (3.8.0-3220-g866b921892)
Fatal error: unusable configuration
Driver failed to start (exit status=1)
Unable to open /dev/ttyS0: Permission denied
Current user id: nut (100)
Serial port owner: root (0)
Serial port group: audio (18)
Mode of port: 0660
Things to try:

  • Use another port (with the right permissions)
  • Fix the port owner/group or permissions on this port
  • Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
    See upsdrvctl(8) and ups.conf(5).
    [cont-init.d] nut.sh: exited 1.

from addon-nut.

maslyankov avatar maslyankov commented on June 15, 2024

Has there been any progress on this issue? I am running on a NUC and get this permission issue.

[17:55:54] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 3.8.0-3220-g866b921892
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (3.8.0-3220-g866b921892)
Fatal error: unusable configuration
Driver failed to start (exit status=1)
Unable to open /dev/ttyS0: Permission denied
Current user id: nut (100)
Serial port owner: root (0)
Serial port group: audio (18)
Mode of port: 0660
Things to try:

  • Use another port (with the right permissions)
  • Fix the port owner/group or permissions on this port
  • Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
    See upsdrvctl(8) and ups.conf(5).
    [cont-init.d] nut.sh: exited 1.

Nope, nothing new here :(

from addon-nut.

Sergey-SRG avatar Sergey-SRG commented on June 15, 2024

Has there been any progress on this issue? I am running on a NUC and get this permission issue.

[17:55:54] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 3.8.0-3220-g866b921892
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (3.8.0-3220-g866b921892)
Fatal error: unusable configuration
Driver failed to start (exit status=1)
Unable to open /dev/ttyS0: Permission denied
Current user id: nut (100)
Serial port owner: root (0)
Serial port group: audio (18)
Mode of port: 0660
Things to try:

  • Use another port (with the right permissions)
  • Fix the port owner/group or permissions on this port
  • Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
    See upsdrvctl(8) and ups.conf(5).
    [cont-init.d] nut.sh: exited 1.

sudo chmod 666 /dev/ttyS0

from addon-nut.

ben-digitalhive avatar ben-digitalhive commented on June 15, 2024

Im happy tip test this suggested chmod change but where do i do it? Inside the nut container? How? Sorry im not a noob but docker is new for me.

sudo chmod 666 /dev/ttyS0

from addon-nut.

DaAwesomeP avatar DaAwesomeP commented on June 15, 2024

To link to related issues:
#32 (same issue, but was closed as a supervisor issue)
#33 (pull to manually fix permission, closed as a supervisor issue)
home-assistant/supervisor#1614 (supervisor issue, closed saying nothing can be done on the supervisor end to fix using non-root with existing files)

The potential fixes are to add permissions fixes as I did in #33 (works but is improper) or to run NUT as root. But @sinclairpaul said on Discord that getting it to run as root doesn't work. I will try this soon too.

from addon-nut.

DaAwesomeP avatar DaAwesomeP commented on June 15, 2024

@ben-digitalhive applying the permissions fix from #33 on your machine locally would probably be best accomplished by downloading the addon from my fork with the fix and installing it as a local addon. That way the fix will be sustained across restarts/rebuilds/reinstalls.

However, I would honestly recommend that waiting for a proper fix would be best.

from addon-nut.

ben-digitalhive avatar ben-digitalhive commented on June 15, 2024

@ben-digitalhive applying the permissions fix from #33 on your machine locally would probably be best accomplished by downloading the addon from my fork with the fix and installing it as a local addon. That way the fix will be sustained across restarts/rebuilds/reinstalls.

However, I would honestly recommend that waiting for a proper fix would be best.

I think i will wait. While it would be nice to have visbility of the UPS state its not critical.

from addon-nut.

DaAwesomeP avatar DaAwesomeP commented on June 15, 2024

Mine shows latest commit, and I gave it a try and it seems to work!

13:19:32] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 3.8.0-3220-g866b921892
Network UPS Tools - Generic contact-closure UPS driver 1.36 (3.8.0-3220-g866b921892)
UPS type: CyberPower Power99
[cont-init.d] nut.sh: exited 0.
[cont-init.d] nutclient.sh: executing... 
[cont-init.d] nutclient.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[13:19:34] INFO: Starting the UPS information server...
Network UPS Tools upsd 3.8.0-3220-g866b921892
   0.000000	fopen /var/run/nut/upsd.pid: No such file or directory
   0.001689	listening on 0.0.0.0 port 3493
   0.004721	Connected to UPS [ups1]: genericups-ups1
[13:19:34] INFO: Starting the UPS monitor and shutdown controller...
Network UPS Tools upsmon 3.8.0-3220-g866b921892
   0.000000	fopen /var/run/upsmon.pid: No such file or directory
   0.000929	Using power down flag file /etc/killpower
   0.001637	UPS: ups1@localhost (master) (power value 1)
   0.003860	debug level is '1'
   0.003906	Warning: running as one big root process by request (upsmon -p)
   0.027174	Trying to connect to UPS [ups1@localhost]
   0.072858	User [email protected] logged into UPS [ups1]
   0.028130	Logged into UPS ups1@localhost

This is with a hardware serial port /dev/ttyS0. I restarted the host before trying because the modified version of the addon I was using modified permissions on /dev/tty*, so this should be clean test.

from addon-nut.

maslyankov avatar maslyankov commented on June 15, 2024

I have pushed a fix which should be available on the Edge repo to run as root. I have tested with a USB device which appears to be fine. It would be great if anyone with the issue could validate and test?

This seems to fix the issue! Working flawlessly! :) Thank you.

from addon-nut.

addons-assistant avatar addons-assistant commented on June 15, 2024

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

from addon-nut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.