banner

Similar to:

Ubuntu Linux, Unable to set bitcoin datadir to a folder in different drive

and

I can’t start bitcoind on Raspberry Pi. Why do I need settings.json.tmp when I didn’t need it before?

I am configuring BTCPayServer to use a datadir that is not my root directory because I don’t have enough space on my root directory for my pruned BTCPayServer Node.
When configuring and running BTCPayServer I am logged in as root the entire time, root (obviously) has access to my alternative directory.
This can be verified by running ls -l altdatadir

It outputs (edited to be generic):

drwxr-xr-x 7 root root 4096 Mar 28 16:23 altdatadir

I applied the alternate paths to the appropriate lines in docker-fragments/bitcoin.yml.

When I run the setup script everything appears to start, however if I try to call bitcoin-cli.sh it tells me it is restarting along with its unique hash. When I run docker logs (unique hash) it outputs (edited to be generic):

Error: Settings file could not be written:
 - Error: Unable to open settings file /media/$USER/altdatadir/.bitcoin/settings.json.tmp for writing

I am assuming under the given setup core is already being run as root (because btcpay server is being run as root) , which is the only given solution to this issue when it has appeared in the 2nd similar question’s situation. If it is not the case how do I force BTCPayServer-docker to run it as root?

If it is the case and I am root when running core, why do I not have the ability to write into the directory/files?

banner

Converter

Source: CurrencyRate
Top Selling Multipurpose WP Theme

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

banner

Leave a Comment

Layer 1
Your Crypto & Blockchain Beacon

CryptoInsightful

Welcome to CryptoInsightful.com, your trusted source for in-depth analysis, news, and insights into the world of cryptocurrencies, blockchain technology, NFTs (Non-Fungible Tokens), and cybersecurity. Our mission is to empower you with the knowledge and understanding you need to navigate the rapidly evolving landscape of digital assets and emerging technologies.