Execute Program from Host into Container as non-root = Permission Denied

Sorry for the long title but I have run into the following problem. I am attempting to run Chromium-Browser from within a container from the host (figured it was a goodway to sandbox the internet). It works splendidly but I have to --no-sandbox Chromium to get it to run as root (this makes Chromium throw up a warning). No problem, I’ll run it as su ubuntu. Much better except if I want to run from the host:

$ lxc exec Chromium su ubuntu chromium-browser
gets
"bash: chromium-browser: Permission denied"

From inside the container:
root@Chromium# su ubuntu
ubuntu@Chromium$ chromium-browser

gets no error and it runs fine.

Is there any way to get chromium-browser to execute via a non-privileged user from outside the container?

Thank you

EDIT: lxd version is 4.14
container OS is Ubuntu 18.04

lxc exec Chromium -- su ubuntu -c chromium-browser

Thank you!

What does the -c do?

That’s how you tell su what command to run, otherwise it runs the shell and passes whatever you’re giving it as argument to the shell :slight_smile:

A prime example of not knowing what I don’t know haha

Thank you, again!