# Can I change INSTALL\_PATH for OneAgent dir on Kubernetes or openshift

**URL:** <https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958>\
**Category:** Container platforms\
**Tags:** installation, openshift, oneagent, kubernetes\
**Created:** [September 18, 2019, 7:53am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958 "2019-09-18T07:53:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [September 18, 2019, 7:53am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/1 "2019-09-18T07:53:42Z")

</div>

Hello

The documentation says that for oneAgent custom resourse - _Parameters to be passed to the OneAgent installer. All the [command line parameters of the installer](https://www.dynatrace.com/support/help/technology-support/operating-systems/linux/installation/customize-oneagent-installation-on-linux/?_ga=2.33063550.1927083355.1568614695-1794866113.1541435147) are supported, with the exception of `INSTALL_PATH`._

**Can I change INSTALL\_PATH for OneAgent dir on Kubernetes or openshift?**

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 18, 2019, 7:58am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/2 "2019-09-18T07:58:59Z")

</div>

No. Exactly as the docs say.

It’s because the OneAgent in this cases runs in a container and the host’s directory /opt/dynatrace is mapped to the container (that’s container definition). If you would change the INSTALL\_PATH, the installation would be just done in the container itself and OneAgent will not be able to monitor anything outside the container.

---

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [September 18, 2019, 8:20am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/3 "2019-09-18T08:20:06Z")

</div>

thank you for answer!

what if i rebuild the agent image?

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [September 18, 2019, 8:31am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/4 "2019-09-18T08:31:48Z")

</div>

It would be an unsupported modification. You can not do that.

What problem are you trying to solve?

---

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [September 18, 2019, 8:51am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/5 "2019-09-18T08:51:03Z")

</div>

in /opt customer have 2Gb

---

<div class="post-metadata">

**Author:** ![alois\_mayr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/alois_mayr/32/28887_2.png) [@alois\_mayr](https://community.dynatrace.com/u/alois_mayr)\
**Post date:** [September 19, 2019, 7:32am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/6 "2019-09-19T07:32:48Z")

</div>

Hi, I understand the problem you need to solve (using different directory due to disk space limits) and the operator actually allows you to use a different storage location for the OneAgent.

You could use the parameter ONEAGENT\_ENABLE\_VOLUME\_STORAGE to have the Docker container runtime manage the required volume for the OneAgent bit and bytes. The container runtime will take care of creating the volume in the default location.

The additional (optional) parameter ONEAGENT\_CONTAINER\_STORAGE\_PATH would allow you to directly set the path to be used for the OneAgent files, eg. /path/to/oneagent-files

See: [Deployment — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/kubernetes-deploy#install-oneagent-operator)

---

<div class="post-metadata">

**Author:** ![MAkimov](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MAkimov](https://community.dynatrace.com/u/MAkimov)\
**Post date:** [September 19, 2019, 8:11am UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/7 "2019-09-19T08:11:18Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![niteen\_kole](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@niteen\_kole](https://community.dynatrace.com/u/niteen_kole)\
**Post date:** [February 11, 2021, 2:04pm UTC](https://community.dynatrace.com/t/can-i-change-install-path-for-oneagent-dir-on-kubernetes-or-openshift/21958/8 "2021-02-11T14:04:04Z")

</div>

Presently we struggling can anyone help on below git you say we need to specify path.

> <https://github.com/Dynatrace/dynatrace-oneagent-operator/issues/342>
>
> The one agent deployment fails with
> \`\`\`
> 14:51:06 Started agent deployment as a… container, PID 164480.
> 14:51:06 Downloading agent to /tmp/Dynatrace-OneAgent-Linux.sh via https://qyr08949.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?Api-Token=\*\*\*&arch=x86&flavor=default
> 14:51:07 Download was skipped as the agent version did not change
> 14:51:07 Verifying agent installer signature
> 14:51:10 Verification successful
> 14:51:10 Deploying to: /mnt/host\_root
> 14:51:10 Starting installer...
> 14:51:11 Checking root privileges...
> 14:51:11 OK
> 14:51:11 Error: Insufficient access rights (drwxr-x---) on: /var/log
> 14:51:11 Error: /var/log path must be globally traversable (--x permissions for others).
> 14:51:11 Error: Please adjust the permissions and then retry the installation.
> \`\`\`
> 
> When deployed in an environment that conforms to CIS health checks. The specific health check that causes this failure is
> \`Ensure permissions on all logfiles are configured\`
> 
> !\[Screen Shot 2020-11-11 at 6 32 17 PM (1)\](https://user-images.githubusercontent.com/7716924/99405373-5036f200-28b2-11eb-99e0-427fd9667985.png)
> 
> It is a part of health checks for all operating systems. That list for Ubuntu 18.04 is below:
> \[CIS\_Ubuntu\_Linux\_18.04\_LTS\_Benchmark\_v2.0.1.pdf\](https://github.com/Dynatrace/dynatrace-oneagent-operator/files/5554233/CIS\_Ubuntu\_Linux\_18.04\_LTS\_Benchmark\_v2.0.1.pdf)
> 
> Managed offerings under compliance regulations (IKS for example) require this check be implemented to maintain their audit posture.
> 
> Dynatrace should remove this check or at least account for the situation where the log directory is permissions \`740\`

We cannot make Dynatrace work on kubernetes and manually changing/modifying those permission will not be persistent when node get replace/scaled …
