Open nkuba opened 1 year ago
I'm having the same problem.
docker:
docker run -d \
-p 8333:8333 \
-p 127.0.0.1:8332:8332 \
--volume /mnt/test/bitcoind-data:/bitcoin/.bitcoin \
--name bitcoind-node \
--restart=unless-stopped \
kylemanna/bitcoind
Output:
+ btc_init
+ '[' '!' -e /bitcoin/.bitcoin/bitcoin.conf ']'
+ mkdir -p /bitcoin/.bitcoin
+ echo 'Creating bitcoin.conf'
+ cat
Creating bitcoin.conf
++ dd if=/dev/urandom bs=33 count=1
++ base64
/usr/local/bin/btc_init: line 13: /bitcoin/.bitcoin/bitcoin.conf: Permission denied
@nkuba please check the permissions for the target folder allow user id 1000 write access - you may want to mount a volume to know exactly what folder is being used:
--volume /mnt/test/bitcoind-data:/bitcoin/.bitcoin
@tonytech83 please check your user id has write permissions to the folder and adjust as necessary - and you may want to specify the docker user if appropriate:
ls -lh /mnt/test |grep bitcoind-data
chmod u+w /mnt/test/bitcoind-data
docker run --user 1000:1000 ...
When I'm trying to run a Docker container with
--user 1000:1000
thebtc_init
script fails with/usr/local/bin/btc_init: line 13: /bitcoin/.bitcoin/bitcoin.conf: Permission denied
error.Does it require some additional configuration?
Sample output: