ollama - 💡(How to fix) Fix Setting OLLAMA_MODELS doesn't work correctly.

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…

Error Message

Error: mkdir /mnt/data/ollama: permission denied: ensure path elements are traversable

Code Example

Error: mkdir /mnt/data/ollama: permission denied: ensure path elements are traversable
RAW_BUFFERClick to expand / collapse

What is the issue?

When setting the OLLAMA_MODELS variable to a custom path, e.g., /mnt/data/ollama/models as in the example below:

[Service] Environment="OLLAMA_MODELS=/mnt/data/ollama/models"

The service reports errors and doesn't start correctly. The very limited documentation doesn't mention any limitations or specifics of setting this variable.

In the example above, permissions are set for the ollama/models folders to ollama:ollama (user/group), but ollama doesn't have any write permissions to /mnt/data, which is correct and MUST be respected.

The expected behaviour is that the OLLAMA_MODELS path is used as provided without any question, other than whether it has read/write access to it.

Relevant log output

Error: mkdir /mnt/data/ollama: permission denied: ensure path elements are traversable

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.24.0

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

ollama - 💡(How to fix) Fix Setting OLLAMA_MODELS doesn't work correctly.