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

General forum for ~green, if we get a lot of more users and activity we'll add more topics
Post Reply
User avatar
jmjl
System Operator
Posts: 26
Joined: Mon Feb 06, 2023 3:10 pm

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

Post 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.
khlsvr
Posts: 1
Joined: Thu Oct 03, 2024 8:40 pm

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

Post 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.
User avatar
jmjl
System Operator
Posts: 26
Joined: Mon Feb 06, 2023 3:10 pm

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

Post 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.
Post Reply