Docker - webssh permission denied

Hi

ich nutzte (homegear-testing):

# homegear -v   
Homegear version 0.7.46-3101
Copyright (c) 2013-2020 Homegear GmbH

Required library versions:
  - libhomegear-base: 0.7.46-3101
  - libhomegear-node: 0.1.7-51
  - libhomegear-ipc:  0.1.2-40

PHP (License: PHP License):
This product includes PHP software, freely available from <http://www.php.net/software/>
Copyright (c) 1999-2020 The PHP Group. All rights reserved.

Wenn ich ím Admin Interface die “>_Console” starte sehe ich folgende Meldung (permission denied):

homegear@homegear:/var/log/homegear$ bash: /root/.bashrc: Permission denied

homegear@homegear:/var/log/homegear$ cd
bash: cd: /root: Permission denied
homegear@homegear:/var/log/homegear$ id
uid=1000(homegear) gid=1000(homegear) groups=1000(homegear),20(dialout),10000
homegear@homegear:/etc$ grep homegear /etc/passwd
homegear:x:1000:1000::/home/homegear:/bin/false

Der User ist “homegear”. Nach dem starten der Console oder mit dem Befehl “cd” möchte er in das Homeverzeichniss von root “/root” wechseln. Dafür fehlen die Berechtigungen. In der “/etc/passwd” hat der User homegear keine shell ("/bin/false").

log file:

homegear            | 09/23/20 19:19:32.838 RPC Server (Port 2001): Info: Connection from ::ffff:192.168.178.25:50275 accepted. Client number: 36
homegear            | 09/23/20 19:19:32.838 RPC Server (Port 2001): Info: RPC server client id for client number 36 is: 13
homegear            | 09/23/20 19:19:32.840 RPC Server (Port 2001): Info: Connection from ::ffff:192.168.178.25:50276 accepted. Client number: 37
homegear            | 09/23/20 19:19:32.840 RPC Server (Port 2001): Info: RPC server client id for client number 37 is: 14
homegear            | 09/23/20 19:19:32.840 Web server (Port 2001): Client is requesting: /admin/maintenance/webssh (translated to /var/lib/homegear/www/rpc/admin/maintenance/webssh, method: GET)
homegear            | 09/23/20 19:19:32.840 Script Engine Server: Info: Starting script "/var/lib/homegear/admin-ui/public/index.php" with id 11.
homegear            | 09/23/20 19:19:35.117 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60124 accepted. Client number: 38
homegear            | 09/23/20 19:19:35.117 RPC Server (Port 2001): Info: RPC server client id for client number 38 is: 15
homegear            | 09/23/20 19:19:35.143 RPC Server (Port 2001): Info: Transferring client number 15 to RPC client.
homegear            | 09/23/20 19:19:35.143 Info: Removing server "homegearapp-ac55dbc0-1ad5-bfbc-9a25-c414f29eb001".
homegear            | 09/23/20 19:19:35.155 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.
homegear            | 09/23/20 19:19:35.336 Info: Script 11 exited with code 0.
homegear            | 09/23/20 19:19:35.336 Info: Script with id 11 finished with exit code 0
homegear            | 09/23/20 19:19:35.649 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60126 accepted. Client number: 39
homegear            | 09/23/20 19:19:35.650 RPC Server (Port 2001): Info: RPC server client id for client number 39 is: 16
homegear            | 09/23/20 19:19:35.673 RPC Server (Port 2001): Info: Transferring client number 16 to RPC client.
homegear            | 09/23/20 19:19:35.707 Web server (Port 2001): Client is requesting: /admin/fonts/UbuntuMono-Regular-Latin.woff2 (translated to /var/lib/homegear/www/rpc/admin/fonts/UbuntuMono-Regular-Latin.woff2, method: GET)
homegear            | 09/23/20 19:19:35.710 RPC Server (Port 2001): Info: Connection from ::ffff:192.168.178.25:50279 accepted. Client number: 40
homegear            | 09/23/20 19:19:35.710 RPC Server (Port 2001): Info: RPC server client id for client number 40 is: 17
homegear            | 09/23/20 19:19:35.712 Web server (Port 2001): Client is requesting: /admin/fonts/UbuntuMono-Bold-Latin.woff2 (translated to /var/lib/homegear/www/rpc/admin/fonts/UbuntuMono-Bold-Latin.woff2, method: GET)
homegear            | 09/23/20 19:19:35.726 RPC Server (Port 2001): Client (direction Homegear => browser) successfully authorized as user [homegear] using session authentication.
homegear            | 09/23/20 19:19:35.726 RPC Server (Port 2001): Info: Transferring client number 16 to rpc client.
homegear            | 09/23/20 19:19:35.726 Info: Removing server "homegearapp-ad73fdc3-a8a3-dfaa-7d57-53a212275192".
homegear            | 09/23/20 19:19:35.734 RPC Server (Port 2001): Info: Client number 39 is calling RPC method: subscribePeers (4) Parameters:
homegear            | (String) HomegearApp-ad73fdc3-a8a3-dfaa-7d57-53a212275192
homegear            | (Array length=0)
homegear            | [
homegear            | ]
homegear            | 09/23/20 19:19:35.765 RPC Server (Port 2001): Info: Client number 39 is calling RPC method: setLanguage (4) Parameters:
homegear            | (String) en-US
homegear            | 09/23/20 19:19:35.794 RPC Server (Port 2001): Info: Client number 39 is calling RPC method: system.listMethods (4) Parameters:
homegear            | (String) websshInput
homegear            | 09/23/20 19:19:41.115 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60128 accepted. Client number: 41
homegear            | 09/23/20 19:19:41.116 RPC Server (Port 2001): Info: RPC server client id for client number 41 is: 18
homegear            | 09/23/20 19:19:41.140 RPC Server (Port 2001): Info: Transferring client number 18 to RPC client.
homegear            | 09/23/20 19:19:41.151 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.
homegear            | 09/23/20 19:19:47.113 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60130 accepted. Client number: 42
homegear            | 09/23/20 19:19:47.114 RPC Server (Port 2001): Info: RPC server client id for client number 42 is: 19
homegear            | 09/23/20 19:19:47.138 RPC Server (Port 2001): Info: Transferring client number 19 to RPC client.
homegear            | 09/23/20 19:19:47.138 Info: Removing server "homegearapp-ac55dbc0-1ad5-bfbc-9a25-c414f29eb001".
homegear            | 09/23/20 19:19:47.150 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.
homegear            | 09/23/20 19:19:53.114 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60132 accepted. Client number: 43
homegear            | 09/23/20 19:19:53.114 RPC Server (Port 2001): Info: RPC server client id for client number 43 is: 20
homegear            | 09/23/20 19:19:53.137 RPC Server (Port 2001): Info: Transferring client number 20 to RPC client.
homegear            | 09/23/20 19:19:53.138 Info: Removing server "homegearapp-ac55dbc0-1ad5-bfbc-9a25-c414f29eb001".
homegear            | 09/23/20 19:19:53.150 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.
homegear            | 09/23/20 19:19:59.116 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60136 accepted. Client number: 44
homegear            | 09/23/20 19:19:59.117 RPC Server (Port 2001): Info: RPC server client id for client number 44 is: 21
homegear            | 09/23/20 19:19:59.141 RPC Server (Port 2001): Info: Transferring client number 21 to RPC client.
homegear            | 09/23/20 19:19:59.141 Info: Removing server "homegearapp-ac55dbc0-1ad5-bfbc-9a25-c414f29eb001".
homegear            | 09/23/20 19:19:59.157 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.
homegear            | 09/23/20 19:20:04.050 IPC Server: Info: Client number 1 is calling RPC method: lifetick Parameters:
homegear            | 09/23/20 19:20:05.113 RPC Server (Port 2001): Info: Connection from ::ffff:172.16.0.1:60138 accepted. Client number: 45
homegear            | 09/23/20 19:20:05.113 RPC Server (Port 2001): Info: RPC server client id for client number 45 is: 22
homegear            | 09/23/20 19:20:05.136 RPC Server (Port 2001): Info: Transferring client number 22 to RPC client.
homegear            | 09/23/20 19:20:05.137 Info: Removing server "homegearapp-ac55dbc0-1ad5-bfbc-9a25-c414f29eb001".
homegear            | 09/23/20 19:20:05.147 RPC Server (Port 2001): Error: Session authentication failed for host ::ffff:172.16.0.1. Closing connection.

Hallo @jipp,

vielen Dank! homegear-webssh muss als root gestartet werden. Das ist jetzt korrigiert.

Viele Grüße

Sathya