Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 315935 - sys-fs/owfs-2.7_p21: '/etc/init.d/owfs start' fails for ds2490 with permission problem
Summary: sys-fs/owfs-2.7_p21: '/etc/init.d/owfs start' fails for ds2490 with permissi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 277265
Blocks:
  Show dependency tree
 
Reported: 2010-04-18 10:49 UTC by Juergen Rose
Modified: 2016-02-19 11:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/udev/rules.d/46_ds2490.rules (46_ds2490.rules,405 bytes, text/plain)
2010-04-18 10:50 UTC, Juergen Rose
Details
/etc/udev/scripts/ds2490.sh (ds2490.sh,615 bytes, text/plain)
2010-04-18 10:51 UTC, Juergen Rose
Details
part of /var/log/messages while plugging in ds2490 (messages_plugin_ds2940.txt,14.33 KB, text/plain)
2010-04-18 10:52 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2010-04-18 10:49:22 UTC
I am using the slighly modified /etc/conf.d/owfs:
root@lynx:/root(41)# cat /etc/conf.d/owfs
# owfs configuration
#OWFS_OPTS="-m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:4304"
OWFS_OPTS="-u -m /var/lib/owfs/mnt --allow_other -s 127.0.0.1:4304"

If I try to start owfs it fails with:
root@lynx:/root(39)# /etc/init.d/owfs start
 * Starting owfs ...
Could not open the USB adapter. Is there a problem with permissions?                                  [ ok ]

There is an old script for suse which tries to change some permissions under /proc and /dev:
http://owfs.cvs.sourceforge.net/*checkout*/owfs/owfs/src/scripts/usb/suse_setup.sh?revision=1.1&content-type=text%2Fplain

I tried to modify this for current udev and got the /etc/udev/scripts/ds2490.sh
and /etc/udev/rules.d/46_ds2490.rules in the attachment.

But I still get the same error.

In spite of this error there is mounted filesystem under /var/lib/owfs/mnt:

Without /etc/udev/rules.d/46_ds2490.rules:
root@lynx:/root(53)# ll /var/lib/owfs/mnt/             
total 0
drwxr-xr-x 1 root root  8 Apr 18 12:04 bus.0/
drwxr-xr-x 1 root root  8 Apr 18 12:04 bus.1/
drwxr-xr-x 1 root root  8 Apr 18 12:04 settings/
drwxr-xr-x 1 root root  8 Apr 18 12:04 statistics/
drwxr-xr-x 1 root root 30 Apr 18 12:04 structure/
drwxr-xr-x 1 root root  8 Apr 18 12:04 system/
drwxr-xr-x 1 root root  8 Apr 18 12:04 uncached/


With /etc/udev/rules.d/46_ds2490.rules
root@thinkpad:/root(152)# ll /var/lib/owfs/mnt/
total 0
drwxr-xr-x 1 root root  8 Apr 18 12:23 bus.0/
drwxr-xr-x 1 root root  8 Apr 18 12:23 bus.1/
drwxr-xr-x 1 root root  8 Apr 18 12:23 settings/
drwxr-xr-x 1 root root  8 Apr 18 12:23 statistics/
drwxr-xr-x 1 root root 30 Apr 18 12:23 structure/
drwxr-xr-x 1 root root  8 Apr 18 12:23 system/
drwxr-xr-x 1 root root  8 Apr 18 12:23 uncached/

A temperature sensor ds1829, which is connected to the ds2490, is also not found. It should possible to read the temperature ( http://www.linux-magazin.de/Heft-Abo/Ausgaben/2006/03/Ist-das-nicht-cool/(offset)/2 ) from /var/lib/owfs/mnt/*/temperature. But there are no var/lib/owfs/mnt/*/temperature files.


Reproducible: Always
Comment 1 Juergen Rose 2010-04-18 10:50:37 UTC
Created attachment 228249 [details]
/etc/udev/rules.d/46_ds2490.rules
Comment 2 Juergen Rose 2010-04-18 10:51:21 UTC
Created attachment 228251 [details]
/etc/udev/scripts/ds2490.sh
Comment 3 Juergen Rose 2010-04-18 10:52:45 UTC
Created attachment 228253 [details]
part of /var/log/messages while plugging in ds2490
Comment 4 Juergen Rose 2010-04-26 12:56:21 UTC
I found the solution at http://owfs.org/index.php?page=udev-and-usb.
Using the following four lines as /etc/udev/rules.de/46_ds2490.rules
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="owfs_rules_end"
# DS2490 1-Wire adapter 
SYSFS{idVendor}=="04fa", SYSFS{idProduct}=="2490", MODE="660", GROUP="owfs"
LABEL="owfs_rules_end"

the permission problem starting /etc/init.d/owfs disapeared.
Comment 5 destroyedlolo 2015-06-27 10:05:49 UTC
It's also true for any devices used by owfs.

For example, my 1wire network is exposed on my BananaPI thru an I2C adapter, and I had to add the following rule :

--- /lib/udev/rules.d/60-i2c.rules ---
KERNEL=="i2c-*", GROUP="owfs", MODE="0660"
---

Best regards,

Laurent
Comment 6 Pacho Ramos gentoo-dev 2015-06-29 18:59:37 UTC
Is anyone willing to proxy maintain this?
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 7 Thomas Deutschmann gentoo-dev 2016-02-19 11:04:48 UTC
sys-fs/owfs-3.1p1 is now in tree which should fix the reported problem:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e788d1233936b0c24d52abd74c43fc6a4a6e09cf

Thanks for reporting!