PermissionsStartOnly
is deprecated (but not yet removed); its
functionality replaced by special executable prefixes. The !
prefix
allows the prefixed command to be run with unrestricted User and Group.
This is necessary to ensure group ownership is set correctly to the
configuration directory.
contrib: replace deprecated PermissionsStartOnly in systemd init #16994
pull setpill wants to merge 1 commits into bitcoin:master from setpill:fix-deprecated-permissionsstartonly changing 1 files +1 −2-
setpill commented at 10:12 am on September 30, 2019: contributor
-
laanwj added the label Scripts and tools on Sep 30, 2019
-
laanwj renamed this:
Systemd replace deprecated PermissionsStartOnly
contrib: replace deprecated PermissionsStartOnly in systemd init
on Sep 30, 2019 -
hebasto commented at 11:31 am on September 30, 2019: member
ACK 36030e0a07b8adac990b38a0b544f54cb150904f, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.Concept ACK. Will test.See: Special executable prefixes
PermissionsStartOnly
is deprecated sincesystemd
v240.Systemd versions:
- Debian:
- jessie:
215-17+deb8u13
- stretch (via backports):
241-5~bpo9+1
- buster:
241-7~deb10u1
- jessie:
- Ubuntu:
- xenial:
229-4ubuntu21.21
- bionic:
237-3ubuntu10.29
- xenial:
- Fedora 30:
241-12.git1e19bcd.fc30
- Debian:
-
in contrib/init/bitcoind.service:23 in 36030e0a07 outdated
19@@ -20,8 +20,7 @@ ExecStart=/usr/bin/bitcoind -daemon \ 20 -datadir=/var/lib/bitcoind 21 22 # Make sure the config directory is readable by the service user 23-PermissionsStartOnly=true 24-ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin 25+!ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
hebasto commented at 12:06 pm on September 30, 2019:0ExecStartPre=!/bin/chgrp bitcoin /etc/bitcoin
setpill commented at 12:52 pm on September 30, 2019:Good catch :grimacing:Systemd replace deprecated PermissionsStartOnly
PermissionsStartOnly is deprecated (but not yet removed); its functionality replaced by special executable prefixes. The `!` prefix allows the prefixed command to be run with unrestricted User and Group. This is necessary to ensure group ownership is set correctly to the configuration directory.
setpill force-pushed on Sep 30, 2019hebasto commented at 12:54 pm on September 30, 2019: memberACK bd8d659c7f944406865ba2937cab7fad2e88c614, tested on Linux Mint 19.2
0hebasto@linux-511:~$ systemctl start bitcoind.service 1hebasto@linux-511:~$ stat /etc/bitcoin | grep id 2Access: (0710/drwx--x---) Uid: ( 0/ root) Gid: ( 1002/ bitcoin)
ryanofsky commented at 3:26 pm on September 30, 2019: contributorDo we know what version the prefix syntax was introduced, and if there are operating systems where the current file works but would be broken by this change?
https://github.com/systemd/systemd/pull/10802#issuecomment-439446299 says they don’t have plans to drop support for PermissionsStartOnly
hebasto commented at 3:47 pm on September 30, 2019: memberDo we know what version the prefix syntax was introduced..?
https://github.com/systemd/systemd/pull/6577, since v235.
So, jessie and xenial do not comply.
setpill commented at 7:08 am on October 1, 2019: contributorSince this file is mostly a suggestion for packagers/sysadmins, would a comment suffice to address pre-v235 situations?setpill commented at 7:10 am on October 1, 2019: contributorThen again, if there’s no immediate plans for systemd to dropPermissionsStartOnly
, perhaps it’s better to revisit this PR when pre-v235 systems are EOL.laanwj commented at 12:09 pm on October 1, 2019: memberThen again, if there’s no immediate plans for systemd to drop PermissionsStartOnly, perhaps it’s better to revisit this PR when pre-v235 systems are EOL.
Tend to agree here, if there’s no hurry, and everything else is the same, staying with the old configuration option for now will result in the least surprises.
laanwj commented at 10:34 am on October 30, 2019: memberThen again, if there’s no immediate plans for systemd to drop PermissionsStartOnly, perhaps it’s better to revisit this PR when pre-v235 systems are EOL.
Can you close this until then, please?
setpill closed this on Oct 30, 2019
laanwj added this to the milestone Future on Oct 30, 2019bitcoin locked this on Dec 16, 2021maflcko removed this from the milestone Future on Jul 23, 2025
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-08-08 15:13 UTC
More mirrored repositories can be found on mirror.b10c.me