On Fri, Aug 10, 2018 at 4:38 PM, Goran <sendmailtogo...@gmail.com> wrote:

> Always the same behavior, if the binary is executed as a user
> different from root, systemd does not find the binary.
>
> In this case
>
> # which bash
> /usr/bin/bash
>
> can't be found by systemd. ExecStart=whatsoever does not work. It
> doesn't matter if it's bash or grafana-server as long the user differs
> from root.
>
>

This test unit works fine for me in lxd. Container created using "lxc
launch images:archlinux arch-test"

######
# cat /etc/systemd/system/test-asuser.service
[Unit]
Description=run as user test

[Service]
User=nobody
Group=nobody

Type=oneshot
ExecStart=/bin/bash -c 'echo $(date) id is $(id) >> /tmp/test-asuser.log'
######

How did you create your container? If you use lxc (not lxd), try the
'download' template.

-- 
Fajar
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to