# Vault operator init - fails with permission issue

**URL:** <https://discuss.hashicorp.com/t/vault-operator-init-fails-with-permission-issue/31475>\
**Category:** Vault\
**Created:** [November 3, 2021, 9:12pm UTC](https://discuss.hashicorp.com/t/vault-operator-init-fails-with-permission-issue/31475 "2021-11-03T21:12:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradley](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/bradley/32/21233_2.png) [@bradley](https://discuss.hashicorp.com/u/bradley)\
**Post date:** [November 3, 2021, 9:12pm UTC](https://discuss.hashicorp.com/t/vault-operator-init-fails-with-permission-issue/31475/1 "2021-11-03T21:12:06Z")

</div>

Hello,

I am trying to init the vault. I am using the apt install vault package and the version is Vault v1.8.4.

Here is the error:

```auto
Error initializing: Error making API request.
URL: PUT http://127.0.0.1:8200/v1/sys/init
Code: 400. Errors:
* failed to initialize barrier: failed to persist keyring: mkdir /etc/vault.d/data/core: read-only file system

```

Here is my config

```auto
ui = true
storage "file" {
  path = "/etc/vault.d/data"
}
listener "tcp" {
  address = "0.0.0.0:8200"
  tls_disable = "true"
}
api_addr = "http://127.0.0.1:8200"
cluster_addr = "https://127.0.0.1:8201"

```

Here is the systemd file:

```auto
[Unit]
Description="HashiCorp Vault - A tool for managing secrets"
Documentation=https://www.vaultproject.io/docs/
Requires=network-online.target
After=network-online.target
ConditionFileNotEmpty=/etc/vault.d/vault.hcl
StartLimitIntervalSec=60
StartLimitBurst=3

[Service]
EnvironmentFile=/etc/vault.d/vault.env
User=vault
Group=vault
ProtectSystem=full
ProtectHome=read-only
PrivateTmp=yes
PrivateDevices=yes
SecureBits=keep-caps
AmbientCapabilities=CAP_IPC_LOCK
CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK
NoNewPrivileges=yes
ExecStart=/usr/bin/vault server -config=/etc/vault.d/vault.hcl
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
TimeoutStopSec=30
LimitNOFILE=65536
LimitMEMLOCK=infinity

[Install]
WantedBy=multi-user.target

```

Things that I have tried or versions:

- chmod 777 -R data/ to give it wide open perms.
- edit systemd file, run it as user root/root and comment out the ProtectHome=read-only
- tried manually adding the core dir, but the error just moved to the next file system access.
- /etc/vault.d has ownership of vault.vault all the way through.
- ubuntu server 20.04.3

Please any help or insight would be greatly appreciated.  
Brad

---

<div class="post-metadata">

**Author:** ![bradley](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/bradley/32/21233_2.png) [@bradley](https://discuss.hashicorp.com/u/bradley)\
**Post date:** [November 3, 2021, 10:24pm UTC](https://discuss.hashicorp.com/t/vault-operator-init-fails-with-permission-issue/31475/2 "2021-11-03T22:24:16Z")

</div>

This is crazy, but rebooting the machine fixed the issue… ☹

Brad

---

<div class="post-metadata">

**Author:** ![mikegreen](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mikegreen/32/3160_2.png) [@mikegreen](https://discuss.hashicorp.com/u/mikegreen)\
**Post date:** [November 5, 2021, 10:01pm UTC](https://discuss.hashicorp.com/t/vault-operator-init-fails-with-permission-issue/31475/3 "2021-11-05T22:01:06Z")

</div>

> [@bradley](#):
>
> rebooting

Probably the service definition file wasn’t reloaded.  
Can get around that with something like  
`sudo systemctl reload-or-restart vault`
