You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RPC cookie: a deliberately group-readable cookie warns on every start; flag like Core's -rpccookieperms? #1060
read_cookie_file warns whenever the cookie has any group or world bit (crates/rbitcoin-rpc/src/auth.rs:91-92 at 4e2a8135, from d460c051):
WARN rpc: cookie /run/rbitcoin/rpc.cookie mode 640 is group or world accessible
A 0640 cookie is the documented way to share RPC with another local user, though. docs/operator/interfaces.md:241-244 (mempool) and docs/wallets.md:67 both use install -m 0640 … -g <group>. So anyone following the docs gets this warning once per start, and has no way to say it's intended. I run this setup with a NixOS module for mempool: the cookie is 0640, owned by rbitcoin, group rbitcoinrpc, and mempool is the only member of that group.
Bitcoin Core handles this with -rpccookieperms=<readable-by> (owner, group or all; default owner-only). Could rbitcoin get a matching flag, for example --rpc-cookie-perms owner|group|all with a conf key rpc_cookie_perms=?
Default owner, so nothing changes unless it's set.
rbitcoin never writes the cookie, so the flag wouldn't chmod anything. It would declare the widest access the operator intends, and the node would warn only when the file is wider than that. It could also refuse to start, the way the line-ending check does.
The docs recipe would then pass --rpc-cookie-perms group, and the warning would still catch an accidental 0644.
Narrower alternative: warn only on world bits (mode & 0o007). That quiets the documented recipe, but no longer flags group access through a primary group that other users share, which interfaces.md already calls out as a risk. The explicit flag keeps that case visible.
Happy to send a PR (a launch journey with 0640 plus group quiet, and 0644 warning) if the flag sounds right.
#1074 adds --rpc-cookie-perms owner|group|all (conf rpc_cookie_perms=, NixOS services.rbitcoin.rpc.cookiePerms). Default owner refuses a cookie with group or world bits. group allows 0640 and still refuses world bits. all allows any mode. The node still does not create or chmod the file.
Activity
rearden-grok commentedon Oct 18, 2026
#1074 adds
--rpc-cookie-perms owner|group|all(confrpc_cookie_perms=, NixOSservices.rbitcoin.rpc.cookiePerms). Defaultownerrefuses a cookie with group or world bits.groupallows 0640 and still refuses world bits.allallows any mode. The node still does not create or chmod the file.