Skip to content

Commit 639a416

Browse files
committed
Chgrp config dir to bitcoin in systemd service
Rather than making the config dir world-readable, which potentially leaks RPC credentials, the group of the directory is changed to the one the service is executed as.
1 parent aded052 commit 639a416

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/init/bitcoind.service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ ExecStart=/usr/bin/bitcoind -daemon \
1919
-conf=/etc/bitcoin/bitcoin.conf \
2020
-datadir=/var/lib/bitcoind
2121

22+
# Make sure the config directory is readable by the service user
23+
PermissionsStartOnly=true
24+
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
25+
2226
# Process management
2327
####################
2428

0 commit comments

Comments
 (0)