Ignore my previous question I figured out how to make it work
Instead of:
* lxc exec cn1 -- chmod +x /home/$USER/*.sh*
I used this...
lxc exec cn1 -- /bin/bash -c "chmod +x /home/$USER/*.sh"
and that worked !
sorry for the noise
Brian
Hi,
Your problem is a misunderstanding of shell glob expansion.
The *.sh is expanded on the machine you're running the command on, then
the expanded form of the command is spawned by the shell, that's why
you're seeing host paths when running it.
lxc exec cn1 -- sh -c "chmod +x /home/$USER/*.sh"
I was working on a bash script to automate some LXD/LXC container setups.
I successfully created the container cn1
I successfully added a new User to cn1
I successfully PUSHed several script files to the Home directory of the new
User in CN1
However, when I try to chmod +x those scripts using: