How to change user permissions on the /blocks/ folder in linux?

1

1

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.

user3145

Posted 2013-05-09T21:10:31.050

Reputation: 777

1

Doesn't this question belong on the Linux SE?

Steven Roose 2013-05-09T23:34:52.443

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 2013-05-12T05:28:29.003

Coincidentally, I had the same issue yesterday. Very weird.Steven Roose 2013-05-12T14:34:27.817

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 2013-05-18T02:27:07.720

Answers

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

runeks

Posted 2013-05-09T21:10:31.050

Reputation: 1 137

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 2017-06-30T12:18:26.217