<p>The process writing the file is <code>bitcoind</code>, not <code>bitcoin-cli</code>, which is simply issuing RPC commands to the server.<code>bitcoind</code> needs to be able to write to the destination, which can’t be another users home folders unless you explicitly give it permission. </p>

CC BY-SA 4.0
2019-01-19T02:47:05.247Z
I don't understand this model. I have my private ~/.bitcoin directory with my private stuff there I hope. I interact with the blockchain with bitcoind. It makes no sense for the bitcoind to be able to write to my home folder from my perspective.
hendry
CC BY-SA 4.0
2019-01-19T02:49:42.927Z
The file list you posted is not of a synchronised node, by the way.
Claris
CC BY-SA 4.0
2019-01-19T09:28:39.073Z
synchronized afaict https://s.natalian.org/2019-01-19/1547890087_2548x1398.png
hendry
CC BY-SA 4.0
2019-01-18T03:39:28.553Z
2019-01-18T03:39:28.553Z
Claris
<pre><code>hendry@knuckles ~ $ bitcoin-cli backupwallet /home/hendry/backup.dat
error code: -1
error message:
boost::filesystem::status: Permission denied: "/home/hendry/backup.dat"
</code></pre>

<p>Reddit couldn't help me <a href="https://www.reddit.com/r/BitcoinBeginners/comments/aftb91/am_i_running_bitcoin_core/" rel="nofollow noreferrer">https://www.reddit.com/r/BitcoinBeginners/comments/aftb91/am_i_running_bitcoin_core/</a></p>

<p>This is no permission problem.</p>

<pre><code>hendry@knuckles ~ $ touch backup.dat
hendry@knuckles ~ $ ls backup.dat
backup.dat
hendry@knuckles ~ $ rm backup.dat
</code></pre>

<p>I suspect the <code>bitcoind -server</code> which runs in isolation as "nobody" is trying to access my home directory, which is a bit of a concern. My user's .bitcoin directory looks fine:</p>

<pre><code>hendry@knuckles ~ $ find .bitcoin/
.bitcoin/
.bitcoin/mempool.dat
.bitcoin/wallets
.bitcoin/wallets/wallet.dat
.bitcoin/wallets/db.log
.bitcoin/wallets/.walletlock
.bitcoin/.lock
.bitcoin/chainstate
.bitcoin/chainstate/000003.log
.bitcoin/chainstate/CURRENT
.bitcoin/chainstate/MANIFEST-000002
.bitcoin/chainstate/LOCK
.bitcoin/fee_estimates.dat
.bitcoin/banlist.dat
.bitcoin/blocks
.bitcoin/blocks/index
.bitcoin/blocks/index/000003.log
.bitcoin/blocks/index/CURRENT
.bitcoin/blocks/index/000004.log
.bitcoin/blocks/index/MANIFEST-000002
.bitcoin/blocks/index/LOCK
.bitcoin/blocks/index/000005.ldb
.bitcoin/blocks/rev00000.dat
.bitcoin/blocks/blk00000.dat
.bitcoin/peers.dat
.bitcoin/bitcoin.conf
.bitcoin/debug.log
</code></pre>

<bitcoin-cli><backup>
How do I backup my wallet with bitcoin-cli over RPC?
hendry
# How do I backup my wallet with bitcoin-cli over RPC?

(Asked by: username_0 on 2019-01-18)

username_0@knuckles ~ $ bitcoin-cli backupwallet /home/username_0/backup.dat
error code: -1
error message:
boost::filesystem::status: Permission denied: "/home/username_0/backup.dat"

Reddit couldn't help me https://www.reddit.com/r/BitcoinBeginners/comments/aftb91/am_i_running_bitcoin_core/
This is no permission problem.
username_0@knuckles ~ $ touch backup.dat
username_0@knuckles ~ $ ls backup.dat
backup.dat
username_0@knuckles ~ $ rm backup.dat

I suspect the bitcoind -server which runs in isolation as "nobody" is trying to access my home directory, which is a bit of a concern. My user's .bitcoin directory looks fine:
username_0@knuckles ~ $ find .bitcoin/
.bitcoin/
.bitcoin/mempool.dat
.bitcoin/wallets
.bitcoin/wallets/wallet.dat
.bitcoin/wallets/db.log
.bitcoin/wallets/.walletlock
.bitcoin/.lock
.bitcoin/chainstate
.bitcoin/chainstate/000003.log
.bitcoin/chainstate/CURRENT
.bitcoin/chainstate/MANIFEST-000002
.bitcoin/chainstate/LOCK
.bitcoin/fee_estimates.dat
.bitcoin/banlist.dat
.bitcoin/blocks
.bitcoin/blocks/index
.bitcoin/blocks/index/000003.log
.bitcoin/blocks/index/CURRENT
.bitcoin/blocks/index/000004.log
.bitcoin/blocks/index/MANIFEST-000002
.bitcoin/blocks/index/LOCK
.bitcoin/blocks/index/000005.ldb
.bitcoin/blocks/rev00000.dat
.bitcoin/blocks/blk00000.dat
.bitcoin/peers.dat
.bitcoin/bitcoin.conf
.bitcoin/debug.log

**Tags:** bitcoin-cli, backup


---

## 1 answers

### Answer by username_1 on 2019-01-18. Score: 1

The process writing the file is `bitcoind`, not `bitcoin-cli`, which is simply issuing RPC commands to the server.`bitcoind` needs to be able to write to the destination, which can’t be another users home folders unless you explicitly give it permission.

> **Comments:**
> **username_0**: I don't understand this model. I have my private ~/.bitcoin directory with my private stuff there I hope. I interact with the blockchain with bitcoind. It makes no sense for the bitcoind to be able to write to my home folder from my perspective.  
> **username_1**: The file list you posted is not of a synchronised node, by the way.  
> **username_0**: synchronized afaict https://s.natalian.org/2019-01-19/1547890087_2548x1398.png  

---

