# Cannot change permissions of /mnt/host\_root/opt directory to u+rwx,g+rx,o+rx - Docker oneagent deploy issue

**URL:** <https://community.dynatrace.com/t/cannot-change-permissions-of-mnt-host-root-opt-directory-to-u-rwx-g-rx-o-rx-docker-oneagent-deploy-issue/32409>\
**Category:** Container platforms\
**Tags:** installation, oneagent, docker\
**Created:** [August 16, 2021, 6:39am UTC](https://community.dynatrace.com/t/cannot-change-permissions-of-mnt-host-root-opt-directory-to-u-rwx-g-rx-o-rx-docker-oneagent-deploy-issue/32409 "2021-08-16T06:39:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Aguinaga](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@Alan\_Aguinaga](https://community.dynatrace.com/u/Alan_Aguinaga)\
**Post date:** [August 16, 2021, 6:39am UTC](https://community.dynatrace.com/t/cannot-change-permissions-of-mnt-host-root-opt-directory-to-u-rwx-g-rx-o-rx-docker-oneagent-deploy-issue/32409/1 "2021-08-16T06:39:16Z")

</div>

Hi guys I need some help. I’m trying to install OneAgent as a docker container on my physical host (ubuntu 20.4) and it gets pretty difficult to get it done.

My “docker run” command is formatted as below:

docker run -d --restart=unless-stopped --privileged=true --pid=host --net host --name=oneagent&nbsp;-v /:/mnt/root -e ONEAGENT\_INSTALLER\_SCRIPT\_URL=“https://.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default” -e ONEAGENT\_INSTALLER\_DOWNLOAD\_TOKEN=\<mytoken\> dynatrace/oneagent oneagent APP\_LOG\_CONTENT\_ACCESS=1output is:&nbsp;Started agent deployment as a container, PID 978125.  
Downloading agent to /tmp/Dynatrace-OneAgent-Linux.sh via&nbsp;https://.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86&flavor=default  
Download complete  
Warning: Cannot change permissions of /mnt/host\_root/opt directory to u+rwx,g+rx,o+rx.  
Warning: Cannot create /mnt/host\_root/opt/dynatrace/oneagent directory.  
mv: cannot move ‘/tmp/Dynatrace-OneAgent-Linux.sh’ to ‘/mnt/host\_root/opt/dynatrace/oneagent/Dynatrace-OneAgent-Linux.sh’: No such file or directory

Why am I getting this permission error? I supposed docker daemon runs as a root privileges.

I ran other older images too and got same problem.

I do it on a virtual machine and get no error, but it does not solve my problem. I don’t know how to solve that.

Any help, please?

---

<div class="post-metadata">

**Author:** ![Karolina\_Linda](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/karolina_linda/32/36089_2.png) [@Karolina\_Linda](https://community.dynatrace.com/u/Karolina_Linda)\
**Post date:** [August 16, 2021, 7:05am UTC](https://community.dynatrace.com/t/cannot-change-permissions-of-mnt-host-root-opt-directory-to-u-rwx-g-rx-o-rx-docker-oneagent-deploy-issue/32409/2 "2021-08-16T07:05:18Z")

</div>

Hi Alan!

Welcome to the Dynatrace Community! I hope you’ll get help from the Dynatrace experts soon.

I just wanted to let you know that I removed the environment ID from your post, following the [Community guidelines](https://community.dynatrace.com/post/159816)&nbsp;not to post sensitive data.

Best regards,

Karolina Linda

_Dynatrace Senior Community Manager_

---

<div class="post-metadata">

**Author:** ![Alan\_Aguinaga](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@Alan\_Aguinaga](https://community.dynatrace.com/u/Alan_Aguinaga)\
**Post date:** [August 17, 2021, 2:54am UTC](https://community.dynatrace.com/t/cannot-change-permissions-of-mnt-host-root-opt-directory-to-u-rwx-g-rx-o-rx-docker-oneagent-deploy-issue/32409/3 "2021-08-17T02:54:20Z")

</div>

It was strange but docker permission gave me the problem. I removed docker from my system and reinstalled again and that annoying problem asking for sudo to run docker can be solved doing that:

- sudo usermod -a -G docker $USER

But I don’t know if first persistent running oneagent container was doing the problem.

Here my steps:

- stopped oneagent container
- I wiped out docker
- reinstalled docker again
- Remove all images and containers
- I do not add my user to docker group yet
- I ran docker oneagent install just using sudo

Now I can have it running ok.
