# Permission error with template stanza

**URL:** <https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593>\
**Category:** Nomad\
**Created:** [July 27, 2023, 12:48pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593 "2023-07-27T12:48:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![insanitybit](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/insanitybit/32/23089_2.png) [@insanitybit](https://discuss.hashicorp.com/u/insanitybit)\
**Post date:** [July 27, 2023, 12:48pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593/1 "2023-07-27T12:48:02Z")

</div>

I’m getting this error:

WARNING: This is a setup for development purposes only; in this mode your clusters may run unrealistically fast and data can be corrupted any time your computer shuts down uncleanly.  
Error: unable to chown temp config file: chown /local/redpanda-3658880638524208918: operation not permitted, temp file removed from disk

It is related to this artifact + template. When I remove the template stanza things work.

```
  artifact {
    source = "https://gist.githubusercontent.com/c4milo/15e35f49e34d84bc6e1918e02b70baab/raw/fa3ecc72acd31852989fb0a7f7bd02cf207c8ddb/redpanda.yml.tpl"
  }

  template {
    source = "local/redpanda.yml.tpl"
    destination = "local/redpanda.yml"
  }

```

Nomad 1.6.1

| Distributor ID: | Ubuntu |
| --- | --- |
| Description: | Ubuntu 22.04.2 LTS |
| Release: | 22.04 |
| Codename: | jammy |

Full job here:

> **[GitHub - c4milo/redpanda-nomad: Dev cluster running on Hashicorp's Nomad](https://github.com/c4milo/redpanda-nomad)**
>
> Dev cluster running on Hashicorp's Nomad. Contribute to c4milo/redpanda-nomad development by creating an account on GitHub.

Agent was run like this:  
sudo nomad agent -dev -bind=0.0.0.0 -network-interface=eth0 \> ~/nomad\_log 2\>&1 &

---

<div class="post-metadata">

**Author:** ![shaun.coss](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/shaun.coss/32/16400_2.png) [@shaun.coss](https://discuss.hashicorp.com/u/shaun.coss)\
**Post date:** [July 31, 2023, 4:57pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593/2 "2023-07-31T16:57:26Z")

</div>

Don’t run Nomad as root. What happens when you remove sudo?

---

<div class="post-metadata">

**Author:** ![insanitybit](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/insanitybit/32/23089_2.png) [@insanitybit](https://discuss.hashicorp.com/u/insanitybit)\
**Post date:** [July 31, 2023, 6:53pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593/3 "2023-07-31T18:53:04Z")

</div>

Without sudo I get " \* Constraint “missing drivers”: 1 nodes excluded by filter"

---

<div class="post-metadata">

**Author:** ![shaun.coss](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/shaun.coss/32/16400_2.png) [@shaun.coss](https://discuss.hashicorp.com/u/shaun.coss)\
**Post date:** [August 1, 2023, 2:38pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593/4 "2023-08-01T14:38:07Z")

</div>

You have some permissions issue with your docker install. I don’t think the symlink was created. Check out this blurb:

> Nomad uses a socket file to communicate with Docker and [by default](https://developer.hashicorp.com/nomad/docs/drivers/docker#endpoint), this file is `/var/run/docker.sock` on Linux, Mac, and other Unix platforms, and `/./pipe/docker_engine` on Windows. Docker Desktop creates a symlink to this socket during installation.
> 
> If the Nomad client fails to detect the Docker driver with the error `Constraint "missing drivers": 1 nodes excluded by filter`, the issue may be this missing symlink. Additional information about this symlink for [Mac](https://docs.docker.com/desktop/mac/permission-requirements/#installing-symlinks) and [Windows](https://docs.docker.com/desktop/windows/permission-requirements/) is available.

More info here:

> **[Create a Cluster | Nomad | HashiCorp Developer](https://developer.hashicorp.com/nomad/tutorials/get-started/gs-start-a-cluster#prerequisites)**
>
> Create a local development cluster or a cloud-based one on one of the major cloud providers.

---

<div class="post-metadata">

**Author:** ![insanitybit](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/insanitybit/32/23089_2.png) [@insanitybit](https://discuss.hashicorp.com/u/insanitybit)\
**Post date:** [August 1, 2023, 6:03pm UTC](https://discuss.hashicorp.com/t/permission-error-with-template-stanza/56593/5 "2023-08-01T18:03:23Z")

</div>

I’ve set up docker such that unprivileged users (including the one nomad is running under) can execute containers. I even gave global r/w access to the socket just to be sure. I restarted the nomad agent and I get the same error when it’s not root.
