Skip to content
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

permissions to /var/lock block usage of USB serial devices on multiple openHAB 3.x containerized and direct installations #12560

Closed
FBachofner opened this issue Apr 2, 2022 · 5 comments
Labels
duplicate external bug A problem or unintended behavior of an external library

Comments

@FBachofner
Copy link

FBachofner commented Apr 2, 2022

Since at least November 2020, there have been reports of openHAB version 3.x users not being able to use USB Z-Wave sticks such as the Zooz USB Z-Wave Plus S2 Stick ZST10

This has been problematic on all three major platforms for Linux (direct installations, Docker and even some new installs on openHABian / RPi )

The issue is related to OH's apparent need to write a lock file to /var/lock where openHAB does not have permissions.

The workarounds are potentially insecure and (just as bad) do not persist across reboots in certain (most?) cases

Some relevant forum posts:

This may be a regression. Some suggest a similar problem existed prior to 2.x -- it may not have been a problem in 2.5.x, however.

I am posting this in openhab-addons since it is not really core funtionality, but relates (in my specific case, at least) to Z-Wave serial device bindings.

Feel free to move to "core" if you feel it is better placed there. Thanks!

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/problem-with-setting-up-zooz-usb-z-wave-plus-s2-stick-zst10/134603/54

@wborn
Copy link
Member

wborn commented Apr 2, 2022

Feel free to move to "core" if you feel it is better placed there.

Seems more like an issue for the nrjavaserial library used by openHAB. That library generates the lock files which has some known issues see also NeuronRobotics/nrjavaserial#60.

@wborn wborn added the external bug A problem or unintended behavior of an external library label Apr 2, 2022
@FBachofner
Copy link
Author

Hi @wborn

Seems more like an issue for the nrjavaserial library used by openHAB.

Thanks for your input. I have gotten similar feedback on the OH forums.

Wow. 6+ years!

I think your mention of this issue in that thread is hopefully good enough to keep some attention on the issue.

Let's leave this here to (hopefully) enhance the likelihood people can find workaround(s) in multiple possible areas/efforts of search.

I partially misstated my concern about persistence a bit in my first post here.

Done "properly" it is not so much to do with reboots as with OS and openHAB upgrades. I fear that such could mess with the workaround of copying /usr/lib/tmpfiles.d/legacy.conf to /etc/tmpfiles.d/legacy.conf and "enforcing" permissions to the /run/lock directory thusly

@wborn
Copy link
Member

wborn commented Apr 4, 2022

Maybe it's worth a try to use the openHAB Docker container again?
I don't know what issues you ran into with that, but I'm using that myself without any issues.
That way you can keep running whatever OS you want on the host. 🙂

@wborn
Copy link
Member

wborn commented Apr 10, 2022

Let's close this as it duplicates openhab/openhab-core#2474

@wborn wborn closed this as completed Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate external bug A problem or unintended behavior of an external library
Projects
None yet
Development

No branches or pull requests

3 participants