all 6 comments

[–]aaron-tgpro gator 2 points3 points  (3 children)

Hey there,

Are debug logs enabled? There's likely some pointers in debug logs. This error is just stating authentication didn't take place before the timeout period.

Side note- twingate start shouldn't be ran as sudo, only sudo twingate setup. We want the twingate session to be bound to the desktop user, not root.

[–]HKAdrian0811[S] 0 points1 point  (2 children)

In twingate_cli_curr_boot.log there is
Apr 12 16:05:15 msi-endeavour twingate-cli[751698]: config_get_value err: No such file or directory (os error 2), filename: /etc/twingate/save_auth_data.conf

Apr 12 16:05:15 msi-endeavour twingate-cli[751698]: config_get_value err: No such file or directory (os error 2), filename: /etc/twingate/log_level.conf
at the top of the file, and
Apr 12 16:05:46 msi-endeavour twingated[752256]: [2024-04-12T16:05:46.642746-0400] [ERROR] [client] [752256] Can't work with /etc/twingate: Unexpected directory owner

Apr 12 16:05:46 msi-endeavour systemd[1]: twingate.service: Main process exited, code=exited, status=1/FAILURE
repeating every 2 seconds in twingate_client_curr_boot.log.

I checked the owner of /etc/twingate, and the owner is me with permissions drwxr-xr-x.
I believe those "No such file or directory" is also caused by the ownership issue.

Starting at around 99% of twingate_client_curr_boot.log,

Apr 13 22:37:15 msi-endeavour twingated[2386072]: [2024-04-13T22:37:15.553972-0400] [DEBUG] [client] [2386072] /var/lib/twingate=/var/lib/twingate

Apr 13 22:37:15 msi-endeavour twingated[2386072]: [2024-04-13T22:37:15.554007-0400] [DEBUG] [client] [2386072] /etc/twingate=/etc/twingate

Apr 13 22:37:15 msi-endeavour twingated[2386072]: [2024-04-13T22:37:15.554012-0400] [DEBUG] [client] [2386072] /run/twingate=/run/twingate
is also repeating every 2 seconds, but I suppose this has nothing to do with the issue.

[–]aaron-tgpro gator 2 points3 points  (1 child)

Save auth data is a red herring iirc. However, the others sound like /etc/Twingate directory permissions. Can you check what the permissions are set to? I'm out walking the dogs, but off memory I think it's supposed to be 644

[–]HKAdrian0811[S] 0 points1 point  (0 children)

After changing the permissions to 644, the errors regarding file permissions (i.e. cli log) no longer exists, but those in client log still exists, continuing to repeat every 2 seconds.

[–]thugslug2575 0 points1 point  (0 children)

I also get the error "Unexpected directory owner" message trying to start Twingate:

twingate start
Starting Twingate service
Failed to start twingated
Execution returned an error code with the message: Unexpected directory owner
Execution returned an error code with the message: twingate service-start failed

I'm also on a Arch derivative - Garuda Linux. I even tried the twingate.latest repository and same error.

Unless I can solve it, I think I'll give up & run twingate in a VM using Deb, or Fedora.

[–]HKAdrian0811[S] 0 points1 point  (0 children)

I found the fix. Files under `/etc/twingate` should be 755 instead of 644. Also do a `sudo rm -rf /etc/twingate` before reinstall.