Page 1 of 1

[wiki article] Modification proposal for IRC.md, add Weechat relay on v4.4.2

Posted: Thu Oct 03, 2024 8:30 pm
by jmjl

Code: Select all

/relay add unix.weechat "${weechat_config_dir}/relay_socket
Make sure that the location in which you decided to store the relay_socket is accessible to user www-data, which means that locations further up the path must at least have the execute bit set for the webserver user, which for now is www-data, so you can could something like:

Code: Select all

setfacl -m 'u:www-data:--x' "$HOME" "$HOME/.weechat" "$HOME/.config" "$HOME/.config/weechat"
To grant the web-server's user access, and the path must be at one of the following paths: Our fellow user ~khlsvr, has tested this on version 4.4.2.

If your relay client asks you for a port or if you want encryption, choose port 443, and that you do want encryption.

I believe the socket needs to be writable and readeable by www-data but not sure.

Re: [wiki article] Modification proposal for IRC.md, add Weechat relay on v4.4.2

Posted: Thu Oct 03, 2024 9:24 pm
by khlsvr
`/debug dirs` was a useful command for me to check the paths for these variables: ${weechat_config_dir}: config directory
${weechat_data_dir}: data directory
${weechat_cache_dir}: cache directory
${weechat_runtime_dir}: runtime directory

After reading your post I now tried setting only write and only read access for the "other" user in turn to the relay_socket and having just the write access I could succesfully connect to the relay, see chat and talk. With opposite by not having write access but having read access I couldn't connect. So I guess just write access is required, but I ended up giving o+rw what they instruct on tilde.club's page.

Re: [wiki article] Modification proposal for IRC.md, add Weechat relay on v4.4.2

Posted: Fri Oct 04, 2024 3:51 pm
by jmjl
Ok, then adding another line to that code block with the following would be neat:

Code: Select all

setfacl -m 'u:www-data:rwx' "$HOME/.weechat/relay_socket" "$HOME/.config/weechat/relay_socket"
Also, You will get a error of files not existing when running the two commands outlined here, this is because you should probably not have a ~/.weechat and ~/.config/weechat, as IIRC it's safe to move ~/.weechat to ~/.config/weechat, and that would follow the xdg spec, but as you could use the other path, the commands I prepared are for both.

Re: [wiki article] Modification proposal for IRC.md, add Weechat relay on v4.4.2

Posted: Sat Nov 09, 2024 8:49 pm
by jmjl
I forgot to add that this got applied, see it live at the wiki