Docker Host Server SSH gets permission denied

@George I trie the docker system prune myself just now and received this error in the Host Server SSH within Wappler - any ideas?

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/prune: dial unix /var/run/docker.sock: connect: permission denied

@George bumping this - can you assist here to do this within Wappler? I’m still getting the permission denied issue.

Note, I have cleaned up the images and containers locally with Docker Desktop App, but no luck for remote - so I can’t currently deploy…

Did you execute them commands listed above?

Hi @George, I am unable to run those commands as I just get the above error when opening Host Server SSH.

Seems a permission is missing, are you able to execute other docker commands and deployments?

Maybe if you can connect to the host terminal, You can try to execute:

sudo chmod 666 /var/run/docker.sock

I am unable to deploy to production due to the above ‘out of space’ issue, but otherwise it seems the permissions are fine - it’s just related to SSH.

Can you clarify on the above, connecting to host terminal? I’m pretty novice to the infra side of things -and really need to clean up prod container so that I can deploy to prod ASAP.

It comes from:

This is pretty daunting @George - I’ve not run any of those types of commands, just relying on Wappler to take care of the installation and management of the Docker container.

I’m not even sure where/how to find the ‘${USER}’ - any ideas where I find this?

That is why I gave you the short version :slight_smile:
No need for complex security setup.

But still very weird, if you see and can manage the docker then you should be able to connect to it.

Is the remote docker really running?

Wait after more detailed examination of the error I see that only the prune command fails.

Could you send me a short video from what exactly you are executing till you get the error?

Sorry @George I’ll provide more detail, my bad.

So, if I open up the Host Server SSH within Wappler, it ‘appears’ to be ok:

I get this: Screen Shot 2021-03-01 at 6.16.57 pm

Then when I try to run:

df -h

This works, I do get some wierd line items that are maxed to 100% though, if you can help?

E.g.

/dev/nvme0n1o1 size: 31g, used, 31g, 100%

Then, if I try to run: docker system df or docker system prune

That’s when it actually fails, and I get the ‘Got permission denied’ error.

Any ideas?

Aha I see - well as the message states in the console you run - a system restart is required. So might want to reboot the Server first.

Thanks @George already done post screenshot. No change. Any guidance please?

@George?

just run that first then the other docker commands, might need to restart the server again first after this command.

the above command just gives your server docker access to itself … i know it is a bit stupid …

Thanks @George. Where do I try running this? Host Terminal SSH?

Yes

Thank you @George - this worked. Will there be anything done in any future updates to better handle this, or should I expect to check this every so often and purge manually?