OH3: permission denied fix in OH config tool resulted in new error when applying improvements

  • openHABian 3.3.0 on rPi4 Raspbian GNU/Linux 11 (bullseye)

I get this error when logging into karaf as openhabian:

/var/lib/openhab/tmp/jansi-2.4.0-e1564dfa7e16a84f-libjansi.so.lck (Permission denied)

In context here:

# [2022-11-15 11:34] openhabian@openhabian /etc/openhab $ 
openhab-cli console

Logging in as openhab
/var/lib/openhab/tmp/jansi-2.4.0-e1564dfa7e16a84f-libjansi.so.lck (Permission denied)

                           _   _     _     ____  
   ___   ___   ___   ___  | | | |   / \   | __ ) 
  / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \ 
 | (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )
  \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/ 
       |_|       3.3.0 - Release Build

Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.

Which has been discussed and solved here:

The suggested solution was:
sudo openhabian-config
and then
10 apply improvements
14 fix permissions

While this fixed the problem… this lead to another error:
(Half way through it said try again, which produced the same error)

Visit the development repository for more details: https://github.com/openhab/openhabian
The tool will now restart to load the updates... OK
2022-11-15_13:26:20_AEST [openHABian] Checking for root privileges... OK
2022-11-15_13:26:26_AEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2022-11-15_13:26:26_AEST [openHABian] openHABian configuration tool version: [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)
2022-11-15_13:26:26_AEST [openHABian] Checking for changes in origin branch openHAB3... OK
2022-11-15_13:28:44_AEST [openHABian] Switching to branch openHAB3... OK
2022-11-15_13:28:45_AEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2022-11-15_13:29:19_AEST [openHABian] Updating Linux package information... OK
2022-11-15_13:35:39_AEST [openHABian] Applying file permissions recommendations... FAILED (openhab folders)
FAILED (folders)
FAILED (unattended upgrades logdir)
FAILED (samba logdir)
FAILED (openhab log)
2022-11-15_16:34:10_AEST [openHABian] Updating Linux package information... OK
2022-11-15_16:34:11_AEST [openHABian] Applying file permissions recommendations... FAILED (openhab folders)
FAILED (folders)
FAILED (unattended upgrades logdir)
FAILED (samba logdir)
FAILED (openhab log)
2022-11-15_16:34:19_AEST [openHABian] Checking for default openHABian username:password combination... OK
2022-11-15_16:34:19_AEST [openHABian] We hope you got what you came for! See you again soon ;)

The following screen, referred to this link:

I had a read… I have a standard installation.
The rPi boots, so does openHAB; it just does not write logfiles anymore.
I have not fiddled with anything, just used the UI to config OH3, plus text-based rules.

Now what?

Has this machine lost power without shutting down?

Is this a brand new SD card?

These errors plus the errors reported on the previous post smells like an SD card corruption or worn out SD card.

These indicate that user root failed to change the permissions on some folders. If root can’t even change the permissions on some folders the operating system is ill indeed. And it’s ill in a way that points to a corrupted SD card as that’s one of the few reasons I’ve ever seen where changes made seem to just fail or get reversed later.

What are the permissions on, let’s say /var/lib/openhab? What happens when you run sudo chmod u=rwx,g=rwx,o=rx /var/lib/openhab. It should just work. If it fails there something fundamental outside of openHAB that’s severely wrong.



What I can add, the previous install was on a USB (thumb) drive.
Not sure what happened to it, as I still read it.

I think all the weird stuff I experienced most recently is most likely related to this thumb drive.

My new set-up is an openHABian default SD card install. Up almost 4 days and pottering along.

Thank you for your support.