[GH-ISSUE #14762] [Bug/Troubleshoot] Permission Denied / File does not exist #56056

Open
opened 2026-04-29 10:12:18 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @DRealHammer on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14762

What is the issue?

I think there is a little bug in how the manifest files are handled when pulling in case there are permission errors when permissions for some locations fail.

Initially there was the error when calling ollama pull qwen3.5:0.8b
Error: open /var/lib/ollama/blobs/sha256-2af3b81862c6be03c769683af18efdadb2c33f60ff32ab6f83e42c043d6c7816-partial-0: permission denied

As i checked the location, it was not owned by the ollama user, but by my user account. So i changed that with sudo chown ollama /var/lib/ollama/blobs

Then a second similar error with
Error: mkdir /var/lib/ollama/manifests/registry.ollama.ai/library/qwen3.5: permission denied

Same fix but with the recursive -R option on the folder and it was owned by root

After these steps everything worked in the pull. Trying to run the model gave this error:
Error: pull model manifest: file does not exist

Solution: delete the manifest folder of the model that has a problem and repull - as the blobs still should exist no new download required for the model itself. After that everything works as usual.

I'll check if i can find the specific section and might create a pull request afterwards, but I think this might be helpful for others.

Relevant log output


OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.17.7

Originally created by @DRealHammer on GitHub (Mar 10, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14762 ### What is the issue? I think there is a little bug in how the manifest files are handled when pulling in case there are permission errors when permissions for some locations fail. Initially there was the error when calling ollama pull qwen3.5:0.8b Error: open /var/lib/ollama/blobs/sha256-2af3b81862c6be03c769683af18efdadb2c33f60ff32ab6f83e42c043d6c7816-partial-0: permission denied As i checked the location, it was not owned by the ollama user, but by my user account. So i changed that with sudo chown ollama /var/lib/ollama/blobs Then a second similar error with Error: mkdir /var/lib/ollama/manifests/registry.ollama.ai/library/qwen3.5: permission denied Same fix but with the recursive -R option on the folder and it was owned by root After these steps everything worked in the pull. Trying to run the model gave this error: Error: pull model manifest: file does not exist Solution: delete the manifest folder of the model that has a problem and repull - as the blobs still should exist no new download required for the model itself. After that everything works as usual. I'll check if i can find the specific section and might create a pull request afterwards, but I think this might be helpful for others. ### Relevant log output ```shell ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.17.7
GiteaMirror added the bug label 2026-04-29 10:12:18 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 10, 2026):

When the ollama server is running as a service, the server is running as user ollama and all the files created will be owned by that user. If you manually run ollama serve, the server is running as you and all the files created will be owned by you. If you switch between running ollama as a service and running it manually you will run into these permissions problems.

<!-- gh-comment-id:4031015109 --> @rick-github commented on GitHub (Mar 10, 2026): When the ollama server is running as a service, the server is running as user `ollama` and all the files created will be owned by that user. If you manually run `ollama serve`, the server is running as you and all the files created will be owned by you. If you switch between running ollama as a service and running it manually you will run into these permissions problems.
Author
Owner

@DRealHammer commented on GitHub (Mar 10, 2026):

When the ollama server is running as a service, the server is running as user ollama and all the files created will be owned by that user. If you manually run ollama serve, the server is running as you and all the files created will be owned by you. If you switch between running ollama as a service and running it manually you will run into these permissions problems.

Yes I agree this could be the root of the problem of the permissions.
I manually ran ollama serve before, but now run it as a service. However this problem did not occur before some updates ago, even after switching, so not sure about that one.

Also there might be some slight inconsistency at which time the manifest is written/checked if it exists in case the write fails.
Do you think this is worth fixing?

<!-- gh-comment-id:4031068179 --> @DRealHammer commented on GitHub (Mar 10, 2026): > When the ollama server is running as a service, the server is running as user `ollama` and all the files created will be owned by that user. If you manually run `ollama serve`, the server is running as you and all the files created will be owned by you. If you switch between running ollama as a service and running it manually you will run into these permissions problems. Yes I agree this could be the root of the problem of the permissions. I manually ran `ollama serve` before, but now run it as a service. However this problem did not occur before some updates ago, even after switching, so not sure about that one. Also there might be some slight inconsistency at which time the manifest is written/checked if it exists in case the write fails. Do you think this is worth fixing?
Author
Owner

@alamrezoanul commented on GitHub (Mar 11, 2026):

can I work on this issue please?
Actually I would like to contribute to this project.

<!-- gh-comment-id:4041534893 --> @alamrezoanul commented on GitHub (Mar 11, 2026): can I work on this issue please? Actually I would like to contribute to this project.
Author
Owner

@DRealHammer commented on GitHub (Mar 12, 2026):

Fine for me, wanted to clarify if this is wanted.

<!-- gh-comment-id:4050081662 --> @DRealHammer commented on GitHub (Mar 12, 2026): Fine for me, wanted to clarify if this is wanted.
Author
Owner

@alamrezoanul commented on GitHub (Mar 13, 2026):

Fine for me, wanted to clarify if this is wanted.

Already created a PR

<!-- gh-comment-id:4058070273 --> @alamrezoanul commented on GitHub (Mar 13, 2026): > Fine for me, wanted to clarify if this is wanted. Already created a PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#56056