Installing openhab cloud connector failed - no rights?!

  • Platform information:
    • Hardware: Intel
    • OS: Ubuntu 22.04.1 LTS
    • Java Runtime Environment: 11.0.17
    • openHAB version: 3.3.0

After using openhab since a few weeks I wanted to install the cloud extension.
Clicking install on the misc->openhab cloud connector shows me the “wait-state” symbol and then nothing more. After refreshing the browser the Extension is shown as installed. But there is no uuid / secret added on the file system. Opening the openhab.log shows:

2023-02-08 19:47:36.687 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed                                                                                                              installing 'openhab-misc-openhabcloud': Keine Berechtigung

Could you support me? Where do openhab needs more rights and how can I provide it?
I´m a linux newbie :smiley:

Thanks for your ideas :wink:

Do the permisions of these directories match ( first row is the command to be executed on your OH host; second and following lines are returned by the command ) ?

ls -ld /var/lib/openhab/uuid  /var/lib/openhab/openhabcloud/ /var/lib/openhab/openhabcloud/secret 
drwxr-xr-x 2 openhab openhab 4096 Oct 22  2021 /var/lib/openhab/openhabcloud/
-rw-r--r-- 1 openhab openhab   20 Oct 22  2021 /var/lib/openhab/openhabcloud/secret
-rw-r--r-- 1 openhab openhab   36 Oct 22  2021 /var/lib/openhab/uuid

First column shows the permissions; openhab is the user and openhab is the group the directories resp. files belong to.

Thanks for your reply… But these folders/files are not created. Even if the installation is shown as “installed” after browser refresh. So I think there is a problem by creating these folders / files during the installation and finally its a crashed installation.

But here is the output of that line:

server@server-TERRA-PC:~$ ls -ld /var/lib/openhab/uuid  /var/lib/openhab/openhab                                                                                                             cloud/ /var/lib/openhab/openhabcloud/secret
ls: Zugriff auf '/var/lib/openhab/uuid' nicht möglich: Datei oder Verzeichnis ni                                                                                                             cht gefunden
ls: Zugriff auf '/var/lib/openhab/openhabcloud/' nicht möglich: Datei oder Verze                                                                                                             ichnis nicht gefunden
ls: Zugriff auf '/var/lib/openhab/openhabcloud/secret' nicht möglich: Datei oder                                                                                                              Verzeichnis nicht gefunden

Yes, of course.
I wanted but I forgot to add the following folder in the list. Is that one available and what is the result for it ?

server@server-TERRA-PC:~$ ls -ld /var/lib/openhab/
drwxr-xr-x 11 openhab openhab 4096 Dez 15 20:43 /var/lib/openhab/

These permissions should be ok although my directory also has w permissions for the goup.
Just to double check: the java process runs with user openhab permissions ?


ps -ef | grep java
openhab    920     1  3 Jan23 ?        13:51:19 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.us.........................................

Looks okay, too?!

server@server-TERRA-PC:~$ ps -ef | grep java
openhab     1034       1  3 19:37 ?        00:02:35 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime

Yes, that is fine.

Is there any other information shown in the error log ?

How is the permission looking at /etc/openhab ??
Here it could be that I´ve changed something in the past because I wanted to share these both directories via samba to maybe edit scripts with visual studio code. But I never did since now and read it´s more for openhab 2.

These two folders I´ve shared:

[openHAB-userdata]
 comment= openHAB Userdaten
 path=/var/lib/openhab
 browseable=Yes
 writeable=Yes
 only guest=no
 public=no
 create mask=0777
 directory mask=0777
 user=server

[openHAB-conf]
 comment= openHAB Konfiguration
 path=/etc/openhab
 browseable=Yes
 writeable=Yes
 only guest=no
 public=no
 create mask=0777
 directory mask=0777
 user=server

In etc/openhab I can edit files via samba (Windows Client). In var/lib/openhab I can´t. I am logged in via windows client as user server. So it seems to be logic, right?

server@server-TERRA-PC:~$ ls -ld /etc/openhab
drwxr-xr-x 14 server server 4096 Feb  9 08:49 /etc/openhab
server@server-TERRA-PC:~$ ls -ld /var/lib/openhab/
drwxr-xr-x 11 openhab openhab 4096 Dez 15 20:43 /var/lib/openhab/

So does normaly has openhab the rights for /etc/openhab or a standard user on the linux (in my case “server”) ?

If yes how can I go back or add openhab again as a owner / user to this directory?

Thanks a lot…

BTW: In the log there is nothing more Wolfgang… Just this one line “no permission and failed”

I changed this directoy to user and group openhab:

server@server-TERRA-PC:~$ ls -ld /etc/openhab
drwxr-xr-x 14 openhab openhab 4096 Feb  9 08:49 /etc/openhab

But trying to install the add on still leaves a comment with “no permission” in the log:

2023-02-09 10:40:36.305 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-openhabcloud': Keine Berechtigung

Any other ideas?

EDIT: YES! It works :slight_smile:
I noticed I only changed ONE directory and not the subfolders…
So you have to write chown -R for rekursiv to change the subfolders in the same time.

Now plugin is gettin installed… I will now try to use it.

1 Like