[GH-ISSUE #12700] Ollama service changes folder perms to something it can't use #70487

Closed
opened 2026-05-04 21:42:01 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ghost on GitHub (Oct 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/12700

What is the issue?

I've tried installing from the AUR and the curl script. In both instances the folder /var/lib/ollama perms are ollama ollama until you start the service. Once ollama is running the service changes the owner and group to someone else and ollama[57383]: Couldn't find '/var/lib/ollama/.ollama/id_ed25519'. Generating new private key.

I've checked the service file both user and group are set to run as ollama. I've tried an Environment change as noted in a different but similar thread on here. Once the service starts that's it. You can't chown lsattr or anything else. The folder is locked, mounted with the wrong details.

Relevant log output

Started Ollama Service.
Oct 19 20:39:14 ollama[57241]: Couldn't find '/var/lib/ollama/.ollama/id_ed25519'. Generating new private key.
Oct 19 20:39:14 ollama[57241]: Error: could not create directory mkdir /var/lib/ollama/.ollama: permission denied
Oct 19 20:39:14 systemd[1]: ollama.service: Main process exited, code=exited, status=1/FAILURE
Oct 19 20:39:14 systemd[1]: ollama.service: Failed with result 'exit-code'.
Oct 19 20:39:17 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 8.

OS

Arch Linux

GPU

various nVidia

CPU

Ryzen

Ollama version

Current as of this post.

Originally created by @ghost on GitHub (Oct 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/12700 ### What is the issue? I've tried installing from the AUR and the curl script. In both instances the folder /var/lib/ollama perms are ollama ollama until you start the service. Once ollama is running the service changes the owner and group to someone else and `ollama[57383]: Couldn't find '/var/lib/ollama/.ollama/id_ed25519'. Generating new private key.` I've checked the service file both user and group are set to run as ollama. I've tried an Environment change as noted in a different but similar thread on here. Once the service starts that's it. You can't chown lsattr or anything else. The folder is locked, mounted with the wrong details. ### Relevant log output ```shell Started Ollama Service. Oct 19 20:39:14 ollama[57241]: Couldn't find '/var/lib/ollama/.ollama/id_ed25519'. Generating new private key. Oct 19 20:39:14 ollama[57241]: Error: could not create directory mkdir /var/lib/ollama/.ollama: permission denied Oct 19 20:39:14 systemd[1]: ollama.service: Main process exited, code=exited, status=1/FAILURE Oct 19 20:39:14 systemd[1]: ollama.service: Failed with result 'exit-code'. Oct 19 20:39:17 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 8. ``` ### OS Arch Linux ### GPU various nVidia ### CPU Ryzen ### Ollama version Current as of this post.
GiteaMirror added the bug label 2026-05-04 21:42:01 -05:00
Author
Owner

@rick-github commented on GitHub (Oct 20, 2025):

the service changes the owner and group to someone else

Who?

What's the contents of the service file?

systemctl cat ollama

What's the output of:

p="/var/lib/ollama/.ollama/id_ed25519"; ls -ld / $(while [ "$p" != "/" ]; do echo "$p"; p=$(dirname "$p"); done | tac)
<!-- gh-comment-id:3421045420 --> @rick-github commented on GitHub (Oct 20, 2025): > the service changes the owner and group to someone else Who? What's the contents of the service file? ``` systemctl cat ollama ``` What's the output of: ``` p="/var/lib/ollama/.ollama/id_ed25519"; ls -ld / $(while [ "$p" != "/" ]; do echo "$p"; p=$(dirname "$p"); done | tac) ```
Author
Owner

@ghost commented on GitHub (Oct 20, 2025):

"Who?" is user and group 963, which is not the ollama user and group id.

Service file is exactly as the script creates it (until I tried to change the Environment var). Before i.e. on install the Environment var in the systemd service file had copied what looked to be my user PATH rather than env variables.

/var/lib/ollama/ is empty, once the service starts the user and group is changed i.e. none of the needed folders and files can be created/queried.

<!-- gh-comment-id:3422730804 --> @ghost commented on GitHub (Oct 20, 2025): "Who?" is user and group 963, which is not the ollama user and group id. Service file is exactly as the script creates it (until I tried to change the Environment var). Before i.e. on install the Environment var in the systemd service file had copied what looked to be my user PATH rather than env variables. /var/lib/ollama/ is empty, once the service starts the user and group is changed i.e. none of the needed folders and files can be created/queried.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#70487