# Docker: Error response from daemon: error while creating mount source path '/var/lib/rancher'

**URL:** <https://forums.suse.com/t/docker-error-response-from-daemon-error-while-creating-mount-source-path-var-lib-rancher/11758>\
**Category:** Rancher 1.x\
**Created:** [September 13, 2018, 1:24pm UTC](https://forums.suse.com/t/docker-error-response-from-daemon-error-while-creating-mount-source-path-var-lib-rancher/11758 "2018-09-13T13:24:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnnyBeGood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/johnnybegood/32/4427_2.png) [@JohnnyBeGood](https://forums.suse.com/u/JohnnyBeGood)\
**Post date:** [September 13, 2018, 1:24pm UTC](https://forums.suse.com/t/docker-error-response-from-daemon-error-while-creating-mount-source-path-var-lib-rancher/11758/1 "2018-09-13T13:24:32Z")

</div>

Hello,

Rancher installed n Ubuntu 18.04 and when I copy install code to register the host with Rancher from  
[http://ubuntudocker:8080/env/1a5/infra/hosts/add?driver=custom](http://ubuntudocker:8080/env/1a5/infra/hosts/add?driver=custom)  
I get this:  
`johnny@ubuntudocker:~$ sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.11 http://ubuntudocker:8080/v1/scripts/A18988A45CCB4DFEDE13:1514678400000:AGyzunAuV47tKA1c85yBWQ3tfig [sudo] password for johnny: docker: Error response from daemon: error while creating mount source path '/var/lib/rancher': mkdir /var/lib/rancher: permission denied. johnny@ubuntudocker:~$`

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [September 14, 2018, 9:04am UTC](https://forums.suse.com/t/docker-error-response-from-daemon-error-while-creating-mount-source-path-var-lib-rancher/11758/2 "2018-09-14T09:04:28Z")

</div>

Are you using `snap` to install Docker? [https://github.com/docker/docker-snap/issues/31](https://github.com/docker/docker-snap/issues/31)

snap is no longer maintained.
