Skip to content

bitcoind: dataDirReadableByGroup relies on sysperms, which Bitcoin Core ignores #55

Closed

Description

@bobberb

Problem

services.bitcoind.dataDirReadableByGroup (modules/bitcoind.nix:184) relies on bitcoind's sysperms option, which Bitcoin Core no longer has. The packaged bitcoind (31.1, from the pinned nixpkgs) prints:

[warning] Ignoring unknown configuration value sysperms

and creates every file 0600 and every dir 0700, whatever the process umask. So with dataDirReadableByGroup = true:

  • preStart runs chmod -R g+rX blocks (modules/bitcoind.nix:413-417), so block files that exist at service start become group-readable.
  • Block files bitcoind creates while running (blk*.dat, rev*.dat, new index files) are 0600 until the next restart. A group member that reads blocks from disk loses access to new ones.
  • UMask = "0027" (modules/bitcoind.nix:449) has no effect.
  • The services.bitcoind.sysperms option only produces that warning.

No in-tree module sets dataDirReadableByGroup, so this only affects users who set it themselves.

Evidence

$ printf 'regtest=1\nsysperms=1\nlisten=0\nserver=0\ndisablewallet=1\n' > $d/bitcoin.conf
$ (umask 0027; bitcoind -datadir=$d -printtoconsole)
[warning] Ignoring unknown configuration value sysperms
$ ls -l $d/regtest/blocks
-rw------- 1 ... blk00000.dat
drwx------ 2 ... index
-rw------- 1 ... rev00000.dat

bitcoind 31.1 (/nix/store/r64n79lb...-bitcoind-31.1), bitcoind -help-debug lists no sysperms.

Possible fixes

  • Remove sysperms (move it to modules/obsolete-options.nix), and either remove dataDirReadableByGroup too or document that it only covers files existing at start.
  • Or keep group access working with a POSIX default ACL on blocks/ (setfacl -d -m g::rX), set in preStart. bitcoind's explicit 0600 mode still caps the group bits through the ACL mask, so this needs testing before relying on it.

🤖 Generated with Claude Code

Activity

  1. added
    area: modules
    type: bug
    on Oct 16, 2026
  2. added 5 commits that reference this issue on Nov 22, 2026
    a6c362a
    f4bc742
    7e6e9e0
    ce87711
    e1191d0
  3. added a commit that references this issue on Nov 23, 2026
    d030c91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: modulestype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions