Bug 494020 - nut do not provide any mechanism to grant access to /dev/ttyS0
nut do not provide any mechanism to grant access to /dev/ttyS0
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: nut (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Michal Hlavinka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-03 14:08 EDT by Sergei LITVINENKO
Modified: 2009-04-15 02:16 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-14 07:18:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sergei LITVINENKO 2009-04-03 14:08:53 EDT
Description of problem:
/sbin/powercom do not have access to /dev/ttyS0 to manage UPS on /dev/ttyS0

Version-Release number of selected component (if applicable):
nut-2.4.1-2.fc11.i586

How reproducible:
service ups start


Steps to Reproduce:
1. Setup UPS on /dev/ttyS0
2. /sbin/upsdrvctl
3.
  
Actual results:
Access to /dev/ttyS0 is denied

Expected results:
/sbin/upsdrvctl start and work

Additional info:
Changing owner of /dev/ttyS0 to 'nut' in /etc/rc.d/init.d/ups (section 'start') can avoid the problem.
Comment 1 Michal Hlavinka 2009-04-07 04:17:06 EDT
In rawhide is new version of nut (2.4.x instead of 2.2.x), do you know if it worked in older versions (for example in Fedora 10) ?
Comment 2 Michal Hlavinka 2009-04-14 04:41:05 EDT
well, it seems some change in udev package caused this problem:
F-10
/lib/udev/rules.d/50-udev-default.rules:KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
F-11
/lib/udev/rules.d/50-udev-default.rules:KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="dialout"

/dev/ttyS* changed it's group from uucp to dialout, the change came from udev's upstream, so I'm going to made necessary changes in nut.
Comment 3 Michal Hlavinka 2009-04-14 07:18:24 EDT
fixed since nut-2.4.1-3.fc11 ( https://koji.fedoraproject.org/koji/buildinfo?buildID=97850 )

Please test, I have only usb connected ups.
Comment 4 Sergei LITVINENKO 2009-04-14 13:23:04 EDT
https://koji.fedoraproject.org/koji/buildinfo?buildID=97850
Sorry, but your URL is not accessible:

[quote]
An error occurred during a connection to koji.fedoraproject.org.
SSL peer was unable to negotiate an acceptable set of security parameters.
(Error code: ssl_error_handshake_failure_alert)
[/quote]

Can you send me patch by Email?
Comment 5 Michal Hlavinka 2009-04-15 02:16:09 EDT
It's just because you have no account in koji. Use this link (http instead of https).

http://koji.fedoraproject.org/koji/buildinfo?buildID=97850

I think now it should be possible to just update nut using yum update nut (check if it offers you 2.4.1-3.fc11 version, if not use packages from the link). Both packages should be the same. I've provided this link only because this is a little faster so we don't have to wait repository process.

Testing packages that have been built using present rawhide buildroot is more accurate, then use patch and build your own. The patch is really simple: replace all occurrences of 'uucp' in spec file with 'dialout'.

Note You need to log in before you can comment on or make changes to this bug.