Showing results for 
Show  only  | Search instead for 
Did you mean: 

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


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 -v /:/mnt/root -e ONEAGENT_INSTALLER_SCRIPT_URL="" -e ONEAGENT_INSTALLER_DOWNLOAD_TOKEN=<mytoken> dynatrace/oneagent oneagent APP_LOG_CONTENT_ACCESS=1
output is: 
Started agent deployment as a container, PID 978125.
Downloading agent to /tmp/ via
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/' to '/mnt/host_root/opt/dynatrace/oneagent/': 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? 


Community Team
Community Team

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 not to post sensitive data.


Best regards,

Karolina Linda

Dynatrace Senior Community Manager

Keep calm and build Community!


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. 

Featured Posts