Kubernetes - read-only file system

I have problems running Drone v1 on Kubernetes where steps tries to write to /root because the user is root.

I already changed the workspace folder because it would fail by default. Got it from here: Steps failing in Kubernetes Native

  base: /tmp
  path: "."

How can I change the user? :smile:Or fix the folder permissions?

1 Like


I think it can be related to this: https://github.com/drone/drone-runtime/issues/31

I temporarily solved it by running as another user or changing the safe location (most of the time by environment variable) of f.e. the .npm folder to somewhere else.

As far as I can tell it has nothing much todo with the other problem and more with how the config map is mounted to the full directory and thus preventing write access to the full folder. Changing the folder permissions is not possible. Only way would be changing the $HOME variable to something else and thus having another save location.

I hope this helps you a bit :slight_smile:

1 Like

Thank you @Tobias

Looking at it, some programs like docker has it hardcoded sadly :frowning:

For anyone looking, I ran into the same problem as well for the drone-plugin/docker or /gcr containers. There docker login only works if you have write access to $HOME/.docker. You have to set a custom $HOME to change the $HOME to allow write access.

1 Like


the same problems occures when running the helm plugin (https://github.com/ipedrazas/drone-helm).
There, the root path is also hardcoded and unfortunately cannot be changed unless I will create my own fork of the plugin.

@bradrydzewski Does this issue have priority for you? Or will it be fixed in the next sprint?

1 Like

@schrodit I plan to include a fix in the next release candidate (rc.5) which could be available as soon as next Friday. See the following thread in which we discuss the root cause of the issue, and some potential workarounds: Docker-drone auth issues: Kubernetes, 1.0.0-rc4