New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions for `ExecStartPre` in system.d service definition files #4

Open
psychemedia opened this Issue Nov 1, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@psychemedia
Contributor

psychemedia commented Nov 1, 2018

Via https://unix.stackexchange.com/questions/348450/confused-by-execstartpre-entries-in-systemd-unit-file a note on running ExecStartPre commands as root and the service as a specified user. I think this may be an issue for TM351 VM when checking that directories are created? (That said, if the VM creates the directory and then vagrant mounts a similarly pathed one over it, does the service stay happy?)

PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/thing
ExecStartPre=/bin/chmod -R 777 /run/thing

From the docs:

PermissionsStartOnly=
Takes a boolean argument. If true, the permission-related execution options, as configured with User= and similar options (see systemd.exec(5) for more information), are only applied to the process started with ExecStart=, and not to the various other ExecStartPre=, ExecStartPost=, ExecReload=, ExecStop=, and ExecStopPost= commands. If false, the setting is applied to all configured commands the same way. Defaults to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment