I've created a .service file that includes User=xyz in the [Service] section. The service still runs as root. Quid ?

[Unit] Description=... Requires=network-online.target

[Service] ExecStart=/usr/bin/java ... Type=simple ExecStop=/usr/bin/java ... User=siraprise

[Install] WantedBy=multi-user.target


Apparently the behaviour changes if User= is specified before ExecStart=.

Don't know whether that's a feature or an accident, but as a feature it's pretty dumb and moreover it seems undocumented which is actively annoying.

  • Did you file a bug report? – waltinator Jul 18 '17 at 14:24
  • No. Where should I do that ? Systemd ? Ubuntu ? Kubuntu (which is the flavour I am actually using) ? – Erwin Smout Jul 26 '17 at 17:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.