<p>You should be able to change the permissions of the block files using the following command:</p>

<pre><code>sudo chmod -R go+r .bitcoin/
</code></pre>

<p>(replacing <code>.bitcoin/</code> with your <a href="https://en.bitcoin.it/wiki/Data_directory" rel="nofollow">Bitcoin data directory</a>)</p>

<p>The problem is that bitcoind will create all new files with permissions so that only allow the owner of the files can read from and write to them (600), because of the <a href="https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L425" rel="nofollow">following line in <code>init.cpp</code></a>:</p>

<pre><code>umask(077);
</code></pre>

<p>I have created a patch and a pull request that should fix this, though: <a href="https://github.com/bitcoin/bitcoin/pull/4286" rel="nofollow">https://github.com/bitcoin/bitcoin/pull/4286</a></p>

CC BY-SA 3.0
2017-06-30T12:18:26.217Z
For directories "x" mode is also needed, try ``sudo chmod -R go+rX .bitcoin/``. (Capital X sets "x" on direcories only.) Note: the bitcoin data directory contains the wallet.dat, *which shoud be kept private*.
Gábor Héja
CC BY-SA 3.0
2014-06-04T11:29:33.110Z
2014-06-04T11:29:33.110Z
runeks
<p>I have three users on my linux system. root, daemonuser, and abeuser.</p>

<p>daemonuser runs bitcoind</p>

<p>abeuser runs ABE</p>

<p>I cannot seem to change the permission of my "blocks" folder so that abeuser can read from it.</p>

<p>I have tried placing the bitcoin data directory in the /opt/ folder and then running the command:</p>

<blockquote>
  <p>chmod -R +r /opt/bitcoinBlockchain</p>
</blockquote>

<p>with no luck.</p>

<p>/opt/bitcoinBlockchain/blocks is always locked to daemonuser and abeuser cannot read anything inside of it.</p>

CC BY-SA 3.0
2013-05-09T23:34:52.443Z
Doesn't this question belong on the [Linux SE](http://unix.stackexchange.com/)?
Steven Roose
CC BY-SA 3.0
2013-05-12T05:28:29.003Z
No, I don't think so, because I have tried numerous times the suggested linux way... and it doesn't work. bitcoind is locking the folder or something, it's a bitcoind problem, not a linux one imho.
user3145
CC BY-SA 3.0
2013-05-12T14:34:27.817Z
Coincidentally, I had the same issue yesterday. Very weird.
Steven Roose
CC BY-SA 3.0
2013-05-18T02:27:07.720Z
I am not surprised. I can't figure out what bitcoind is doing to that folder, but it's not adding typically kosher unix permissions that's for sure.
user3145
<bitcoind><linux>
How to change user permissions on the /blocks/ folder in linux?
user3145
# How to change user permissions on the /blocks/ folder in linux?

(Asked by: username_0 on 2013-05-09)

I have three users on my linux system. root, daemonuser, and abeuser.

daemonuser runs bitcoind

abeuser runs ABE

I cannot seem to change the permission of my "blocks" folder so that abeuser can read from it.

I have tried placing the bitcoin data directory in the /opt/ folder and then running the command:

> chmod -R +r /opt/bitcoinBlockchain

with no luck.

/opt/bitcoinBlockchain/blocks is always locked to daemonuser and abeuser cannot read anything inside of it.

**Tags:** bitcoind, linux

> **Comments:**
> **username_1**: Doesn't this question belong on the [Linux SE](http://unix.stackexchange.com/)?  
> **username_0**: No, I don't think so, because I have tried numerous times the suggested linux way... and it doesn't work. bitcoind is locking the folder or something, it's a bitcoind problem, not a linux one imho.  
> **username_1**: Coincidentally, I had the same issue yesterday. Very weird.  
> **username_0**: I am not surprised. I can't figure out what bitcoind is doing to that folder, but it's not adding typically kosher unix permissions that's for sure.  

---

## 1 answers

### Answer by username_2 on 2014-06-04. Score: 1

You should be able to change the permissions of the block files using the following command:
sudo chmod -R go+r .bitcoin/

(replacing .bitcoin/ with your Bitcoin data directory)
The problem is that bitcoind will create all new files with permissions so that only allow the owner of the files can read from and write to them (600), because of the following line in init.cpp:
umask(077);

I have created a patch and a pull request that should fix this, though: https://github.com/bitcoin/bitcoin/pull/4286

> **Comments:**
> **username_3**: For directories "x" mode is also needed, try ``sudo chmod -R go+rX .bitcoin/``. (Capital X sets "x" on direcories only.) Note: the bitcoin data directory contains the wallet.dat, *which shoud be kept private*.  

---

