I want to run a Cardano node locally. I have been following this [documentation][1]
while running the code
cardano-node run \
--config $HOME/cardano/testnet-config.json \
--database-path $HOME/cardano/db/ \
--socket-path $HOME/cardano/db/node.socket \
--host-addr 127.0.0.1 \
--port 1337 \
--topology $HOME/cardano/testnet-topology.json
I am getting the following error
[LAPTOP-8:cardano.node.error:Notice:5] [2021-12-13 17:24:13.27 UTC] Failure while attempting to remove the stale local socket: /home/augu/cardano/db/node.socket : /home/augu/cardano/db/node.socket: removeLink: permission denied (Permission denied)
Shutting down..
LocalSocketError "/home/augu/cardano/db/node.socket" /home/augu/cardano/db/node.socket: removeLink: permission denied (Permission denied)
cardano-node: Failure while attempting to remove the stale local socket: /home/augu/cardano/db/node.socket : /home/augu/cardano/db/node.socket: removeLink: permission denied (Permission denied)
Any help is appreciated. [1]: https://developers.cardano.org/docs/get-started/running-cardano
CodePudding user response:
The problem here for the error is that the owner of the DB folder is not the same as the user of the Cardano node.
Using the code sudo chown username db/
I changed the owner of the folder. So as the owner of the db folder and the user of the Cardano node will be the same. Hence problem solved.