su username -c "some command" ends with an error message: /bin/sh Permission denied
I tried create Docker container based on image imported from minirootfs
or based on image from Docker hub library
When I start Docker container (and create user)
docker exec -it container_name /bin/sh
and run command inside like:
su username -c "some command" su username -c "ls"
docker exec -it container_name su username -c "ls"
I get error message: /bin/sh Permission denied
/bin/sh is shell from /etc/passwd
I tried gradually create user with shell:
with same result.
(from redmine: issue id 6621, created on 2017-01-04)