Skip to content

Conversation

@poettering
Copy link
Member

The concept is redundant and predates the special chars that do the same
in ExecStar=. Let's settle on advertising just the latter, and hide
PermissionsStartOnly= from the docs (even if we continue supporting it).

The concept is redundant and predates the special chars that do the same
in ExecStar=. Let's settle on advertising just the latter, and hide
PermissionsStartOnly= from the docs (even if we continue supporting it).
Copy link
Member

@keszybz keszybz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be removed from docs/TRANSIENT-SETTINGS.md.

SD_BUS_PROPERTY("WatchdogUSec", "t", bus_property_get_usec, offsetof(Service, watchdog_usec), SD_BUS_VTABLE_PROPERTY_CONST),
BUS_PROPERTY_DUAL_TIMESTAMP("WatchdogTimestamp", offsetof(Service, watchdog_timestamp), 0),
SD_BUS_PROPERTY("PermissionsStartOnly", "b", bus_property_get_bool, offsetof(Service, permissions_start_only), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("PermissionsStartOnly", "b", bus_property_get_bool, offsetof(Service, permissions_start_only), SD_BUS_VTABLE_PROPERTY_CONST|SD_BUS_VTABLE_HIDDEN), /* 😷 deprecated */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😷 — wow.

@keszybz keszybz added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Nov 16, 2018
@mbiebl
Copy link
Contributor

mbiebl commented Nov 16, 2018

https://codesearch.debian.net/search?q=PermissionsStartOnly%3D&perpkg=1
I didn't expect that it's used that often.

Are there plans to drop PermissionsStartOnly eventually? If so, I'd have to get those affected updated...

@poettering
Copy link
Member Author

Are there plans to drop PermissionsStartOnly eventually? If so, I'd have to get those affected updated...

Dunno, we might consider doing this one day, but doesn't appear like something to do soon.

I mean there's also RootDirectoryStartOnly=, which we probably should handle the same way, but it has no counterpart yet, hence really too early to get rid of either entirely.

@poettering poettering merged commit 3382cf2 into systemd:master Nov 16, 2018
@mbiebl
Copy link
Contributor

mbiebl commented Nov 16, 2018

Ok, when you do actually intend to remove that option, please give us (downstream distros) a heads-up soon enough.

@nh2
Copy link
Contributor

nh2 commented Jan 12, 2019

This deprecation does not seem to be mentioned in any changelog / NEWS so far.

@keszybz
Copy link
Member

keszybz commented Jan 12, 2019

Added to #11387.

yuwata pushed a commit to yuwata/systemd that referenced this pull request Jan 13, 2019
keszybz added a commit to systemd/systemd-stable that referenced this pull request Feb 7, 2019
syuu1228 added a commit to syuu1228/scylladb that referenced this pull request Nov 30, 2022
Since PermissionsStartOnly is deperecated, we need to use new format on
ExecStartPre / ExecStopPost, a special executable prefix '+'.
(which means the command will run in full privilege)

see systemd/systemd#10802
see https://man7.org/linux/man-pages/man5/systemd.service.5.html

Related with scylladb/scylla-enterprise#1067
syuu1228 added a commit to syuu1228/scylladb that referenced this pull request Dec 2, 2022
Since PermissionsStartOnly is deperecated, we need to use new format on
ExecStartPre / ExecStopPost, a special executable prefix '+'.
(which means the command will run in full privilege)

However, older distribution like CentOS7 does not support the prefix
'+', so we need to keep using PermissionsStartOnly (these are systemd < v231).

see systemd/systemd#10802
see https://man7.org/linux/man-pages/man5/systemd.service.5.html

Related with scylladb/scylla-enterprise#1067
markjcrane pushed a commit to fusionpbx/fusionpbx that referenced this pull request Aug 4, 2025
Replace the deprecated PermissionsStartOnly option in favour of the supported method of elevating the exec commands.

systemd/systemd#10802 (comment)
rrobgill added a commit to rrobgill/pi-hole that referenced this pull request Nov 8, 2025
- elevate Prestart and Poststop script permissions using "+" prefix instead,
as per https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Command%20lines

( PermissionsStartOnly was deprecated in systemd 241 and no longer appears in
documentation since 2018 systemd/systemd#10802 )

Signed-off-by: Rob Gill <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed

Development

Successfully merging this pull request may close these issues.

4 participants