I work on a server (Ubuntu 20.04 LTS (GNU/Linux 5.4.0-40-generic x86_64)). Somebody else set-up some folders and mysql data bases in a docker redcap-lamp on this server. In addition, he created a user account for me to enter the server, and the docker.
Every thing works fine with my account.
As login on the server I use: ssh [my user account]@[our server]
.
To enter the docker I (was told to) use: docker exec -it redcap-lamp bash
.
I now had to create a user account for somebody else (and am not used to working in terminals and dockers).
I created a new user account by using: sudo adduser [newUser]
, what worked fine.
It is possible to log in with this new account to have access to our server.
Unfortunately, when I use docker exec -it redcap-lamp bash
to enter the docker with the new account, the permission is always denied. I get the output:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/redcap-lamp/json: dial unix /var/run/docker.sock: connect: permission denied
Do I have to give new users some 'privileges' or something? Does anybody know where the problem lies and how it can be fixed?