Skip to main content
expanded link title; cleanup
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 263

According to documentationsystemd's service documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1"systemd[1]: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

IveI've also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

I know I can use PermissionsStartOnly=true as an alternative, which should work, but that seemed less than ideaideal.

According to documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

I know I can use PermissionsStartOnly=true as an alternative, which should work, but that seemed less than idea.

According to systemd's service documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd[1]: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

I've also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

I know I can use PermissionsStartOnly=true as an alternative, which should work, but that seemed less than ideal.

added 116 characters in body
Source Link
Brozovelt
  • 123
  • 1
  • 1
  • 6

According to documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

I know I can use PermissionsStartOnly=true as an alternative, which should work, but that seemed less than idea.

According to documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

According to documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

I know I can use PermissionsStartOnly=true as an alternative, which should work, but that seemed less than idea.

According to documentation (https://www.freedesktop.org/software/systemd/man/systemd.service.html#PermissionsStartOnly=documentation), a "+"+ may be used as a prefix in systemdsystemd service configurations.

IE I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1/usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd[1]: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1"ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1ExecStartPre="+"/usr/bin/tomcat1, etc.

According to documentation (https://www.freedesktop.org/software/systemd/man/systemd.service.html#PermissionsStartOnly=), a "+" may be used as a prefix in systemd service configurations.

IE I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd[1]: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1", ExecStartPre="+"/usr/bin/tomcat1, etc.

According to documentation, a + may be used as a prefix in systemd service configurations.

I am trying to use it like this:

[Service]
ExecStartPre=+/usr/bin/tomcat1
Type=simple
Environment="NAME=tomcat1"
EnvironmentFile=/etc/sysconfig/tomcat1
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

I want to run /usr/bin/tomcat1 with elevated privileges, but doing so with the "+" sign gives the following error (note, "-" does not give an error).

"systemd1: [/usr/lib/systemd/system/tomcat1.service:10] Executable path is not absolute, ignoring: +/usr/bin/tomcat1"

Ive also tried ExecStartPre="+/usr/bin/tomcat1, ExecStartPre="+"/usr/bin/tomcat1, etc.

Source Link
Brozovelt
  • 123
  • 1
  • 1
  • 6
Loading