-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
Serial connections not working on some Linux distros due to /var/lock permissions #2474
Comments
It's a nrjavaserial issue, so there is not really much to fix in openHAB except for upgrading the library to a version that fixes your issue. See also: NeuronRobotics/nrjavaserial#60 |
Clear, I see it is open since 2016 :-) |
This issue has been mentioned on openHAB Community. There might be relevant details there: |
This issue has been mentioned on openHAB Community. There might be relevant details there: |
Since this is not an openHAB bug, and proper documentation has been added, I'll close here. |
Opened this initially on the zwave binding github, but it appears this is part of the openhab-core?
When installing openhab 3.1.0 on linux based on Red Hat 8, I used Rocky Linux 8.4 and installed:
Installed Packages
openhab.noarch 3.1.0-1 @openhab-stable
the binding wants to write to /var/lock/ for the serial stick which is owned by root:root on these linux versions, so that fails and an error is shown in the journal:
Sep 03 17:13:06 openhab-dev karaf[769]: check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
The paved road is for applications to write to a sub folder under /var/lock/ and include a drop-in /etc/tmpfiles.d to create that folder.
A workaround is discussed here: https://community.openhab.org/t/solved-oh3-zwave-binding-z-wave-serial-controller-aeotec-z-stick-gen5-remains-offline/108182/36
By copying the /usr/lib/tmpfiles.d/legacy.conf to /etc//tmpfiles.d/legacy.conf, and modifying the lines to :
d /run/lock 0755 root root -
to
d /run/lock 0775 root openhab -
and the binding is able to create the lock file and the zwave controller gets online:
[root@openhab-dev ~]# ll /var/lock/
total 4
-rw-r--r-- 1 root root 0 Sep 1 18:52 kdump
-rw-r--r-- 1 openhab openhab 11 Sep 3 17:01 LCK..ttyACM0
drwx------ 2 root root 40 Sep 1 18:52 lvm
drwxr-xr-x 2 root root 40 Sep 1 18:52 subsys
Regards,
Paul.
The text was updated successfully, but these errors were encountered: