ollama - ✅(Solved) Fix [Bug/Troubleshoot] Permission Denied / File does not exist [1 pull requests, 5 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14762Fetched 2026-04-08 00:31:57
View on GitHub
Comments
5
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×5cross-referenced ×1labeled ×1mentioned ×1

Error Message

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 Then a second similar error with Error: mkdir /var/lib/ollama/manifests/registry.ollama.ai/library/qwen3.5: permission denied After these steps everything worked in the pull. Trying to run the model gave this error: Error: pull model manifest: file does not exist

Fix Action

Fixed

PR fix notes

PR #14788: fix: rollback blobs if manifest creation fails during pull

Description (problem / solution / changelog)

Fixes #14762

If manifest creation fails due to filesystem permission errors, downloaded blobs may remain without a manifest. This leaves the model in a partially installed state where later commands fail with "pull model manifest: file does not exist".

This change rolls back partially downloaded blobs when manifest creation fails, ensuring the system remains in a consistent state.

Changed files

  • server/images.go (modified, +17/-5)
  • server/pull_manifest_permission_test.go (added, +46/-0)
  • x/imagegen/mlx/mlx_test.go (modified, +4/-4)
  • x/imagegen/models/flux2/flux2.go (modified, +9/-9)
  • x/imagegen/models/flux2/rope.go (modified, +18/-18)
  • x/imagegen/models/flux2/scheduler.go (modified, +1/-1)
  • x/imagegen/nn/nn.go (modified, +2/-2)
  • x/imagegen/safetensors/safetensors.go (modified, +0/-1)
  • x/imagegen/tokenizer/tokenizer.go (modified, +4/-4)
  • x/imagegen/tokenizer/tokenizer_test.go (modified, +13/-13)
  • x/imagegen/vae/tiling.go (modified, +6/-6)
RAW_BUFFERClick to expand / collapse

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

extent analysis

Fix Plan

To resolve the permission errors and manifest file issues, follow these steps:

  • Change ownership of the /var/lib/ollama/blobs directory to the ollama user:

sudo chown -R ollama /var/lib/ollama/blobs

* Change ownership of the `/var/lib/ollama/manifests` directory to the `ollama` user:
  ```bash
sudo chown -R ollama /var/lib/ollama/manifests
  • If you encounter a "file does not exist" error when running the model, delete the manifest folder of the model and repull:

sudo rm -rf /var/lib/ollama/manifests/registry.ollama.ai/library/qwen3.5 ollama pull qwen3.5:0.8b

### Verification
After applying these fixes, verify that the `ollama pull` and `ollama run` commands work as expected without any permission errors.

### Extra Tips
To prevent similar issues in the future, ensure that the `ollama` user has the correct permissions and ownership of the relevant directories. You can also consider setting up a cron job to periodically check and adjust the permissions as needed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING