YunoHost-Apps / guacamole_ynh

Apache Guacamole package for YunoHost
https://guacamole.apache.org/
Apache License 2.0
10 stars 16 forks source link

RDP connections always fail if guacamole-guacd's `$HOME` does not exist and/or isn't writable #18

Open thurstylark opened 2 years ago

thurstylark commented 2 years ago

Describe the bug

RDP connections always fail with the following in the journal:

guacd[13595]: Creating new client for protocol "rdp"
guacd[13595]: guacd[13595]: INFO:        Creating new client for protocol "rdp"
guacd[13595]: Connection ID is "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f"
guacd[13595]: guacd[13595]: INFO:        Connection ID is "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f"
guacd[25783]: FreeRDP initialization may fail: Writability of the current user's home directory ("/home/guacamole-guacd") could not be determined: No such file or directory
guacd[13595]: guacd[25783]: WARNING:        FreeRDP initialization may fail: Writability of the current user's home directory ("/home/guacamole-guacd") could not be determined: No such file or directory
guacd[25783]: No security mode specified. Defaulting to security mode negotiation with server.
guacd[13595]: guacd[25783]: INFO:        No security mode specified. Defaulting to security mode negotiation with server.
guacd[25783]: Resize method: none
guacd[13595]: guacd[25783]: INFO:        Resize method: none
guacd[25783]: User "@3867a08d-b2fd-4471-bd46-a668e12e847d" joined connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" (1 users now present)
guacd[13595]: guacd[25783]: INFO:        User "@3867a08d-b2fd-4471-bd46-a668e12e847d" joined connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" (1 users now present)
guacd[25783]: Loading keymap "base"
guacd[13595]: guacd[25783]: INFO:        Loading keymap "base"
guacd[25783]: Loading keymap "en-us-qwerty"
guacd[13595]: guacd[25783]: INFO:        Loading keymap "en-us-qwerty"
guacd[25783]: Cannot create static channel "rdpdr": failed to load "guac-common-svc" plugin for FreeRDP.
guacd[13595]: guacd[25783]: WARNING:        Cannot create static channel "rdpdr": failed to load "guac-common-svc" plugin for FreeRDP.
guacd[25783]: Support for the RDPDR channel (device redirection) could not be loaded. Drive redirection and printing will not work. Sound MAY not work.
guacd[13595]: guacd[25783]: WARNING:        Support for the RDPDR channel (device redirection) could not be loaded. Drive redirection and printing will not work. Sound MAY not work.
guacd[25783]: Cannot create static channel "rdpsnd": failed to load "guac-common-svc" plugin for FreeRDP.
guacd[13595]: guacd[25783]: WARNING:        Cannot create static channel "rdpsnd": failed to load "guac-common-svc" plugin for FreeRDP.
guacd[25783]: Support for the RDPSND channel (audio output) could not be loaded. Sound will not work. Drive redirection and printing MAY not work.
guacd[13595]: guacd[25783]: WARNING:        Support for the RDPSND channel (audio output) could not be loaded. Sound will not work. Drive redirection and printing MAY not work.
guacd[25783]: RDP server closed/refused connection: Security negotiation failed (wrong security type?)
guacd[13595]: guacd[25783]: INFO:        RDP server closed/refused connection: Security negotiation failed (wrong security type?)
guacd[25783]: User "@3867a08d-b2fd-4471-bd46-a668e12e847d" disconnected (0 users remain)
guacd[13595]: guacd[25783]: INFO:        User "@3867a08d-b2fd-4471-bd46-a668e12e847d" disconnected (0 users remain)
guacd[13595]: guacd[25783]: INFO:        Last user of connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" disconnected
guacd[25783]: Last user of connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" disconnected
guacd[13595]: Connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" removed.
guacd[13595]: guacd[13595]: INFO:        Connection "$8a4f43d6-74f2-45aa-8932-bf33d7ad194f" removed.

$HOME for guacamole-guacd is set as /home/guacamole-guacd after installing this app, and since that dir doesn't exist, this failure always happens for RDP connections.

After some digging and a chat with the freerdp devs, it seems the way that guacamole is using freerdp is tied to this requirement. See: https://issues.apache.org/jira/browse/GUACAMOLE-931

Context

Steps to reproduce

  1. Install guacamole
  2. Access guacamole's interface
  3. Set up a new RDP connection
  4. Attempt to use new connection

Workaround

Create /home/guacamole-guacd and set ownership to guacamole-guacd:guacamole-guacd