lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.67k stars 2.07k forks source link

lncli bakemacaroon - permission denied #4462

Closed fiksn closed 4 years ago

fiksn commented 4 years ago

Background

lncli bakemacaroon peers:read peers:write

fails with

[lncli] rpc error: code = Unknown desc = permission denied

Your environment

lnd version 0.10.3-beta commit=

Linux ln 4.19.118 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 aarch64 GNU/Linux

Bitcoin Core version v0.19.1.0-g58ba7c314d552cea8cb024960a8504577aee586f

Running on Rapsberry Pi 4

Steps to reproduce

lncli --macaroonpath .../data/chain/bitcoin/mainnet/admin.macaroon --tlscertpath .../lnd.cert --rpcserver 127.0.0.1:10009

Expected behaviour

A macaroon should be baked, potentially serialized to a file when using --save_to

Actual behaviour

I get [lncli] rpc error: code = Unknown desc = permission denied despite the fact I am using admin.macaroon.

guggero commented 4 years ago

See https://github.com/lightningnetwork/lnd/blob/master/macaroons/README.md#upgrading-from-v080-beta-or-earlier and https://github.com/lightningnetwork/lnd/releases/tag/v0.9.0-beta. You need to re-generate your macaroons.

fiksn commented 4 years ago

My bad, sorry. Thought the macaroons have already been recreated in the meanwhile. Works perfectly now.