[GH-ISSUE #10049] Can a path for OLLAMA_MODELS contain a space ? #6589

Closed
opened 2026-04-12 18:14:38 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @redo33 on GitHub (Mar 30, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10049

What is the issue?

I just installed Ubuntu 24.04.2 on my PC and needed to store the model files on the Win11's drive, i.e. D:\Local Disk\LLM\OllamaModels. Nonetheless, this drive can be accessed by Ubuntu flawlessly.

I edited the /etc/systemd/system/ollama.service

Environment="OLLAMA_MODELS=/media/user/Local Disk/LLM/OllamaModels"

The Ollama failed to start, with this error:

ollama[14083]: Error: mkdir /media/user/Local Disk: permission denied

The space in "Local Disk" caused the problem. The path name got truncated. I tried to put any prefix character (\ \) and the single quote, but none of them worked.

Any help would be appreciated. Or this is a bug ?

Thank you.

Relevant log output


OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.6.3

Originally created by @redo33 on GitHub (Mar 30, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10049 ### What is the issue? I just installed Ubuntu 24.04.2 on my PC and needed to store the model files on the Win11's drive, i.e. D:\Local Disk\LLM\OllamaModels. Nonetheless, this drive can be accessed by Ubuntu flawlessly. I edited the /etc/systemd/system/ollama.service `Environment="OLLAMA_MODELS=/media/user/Local Disk/LLM/OllamaModels"` The Ollama failed to start, with this error: `ollama[14083]: Error: mkdir /media/user/Local Disk: permission denied` The space in "Local Disk" caused the problem. The path name got truncated. I tried to put any prefix character (\ \\) and the single quote, but none of them worked. Any help would be appreciated. Or this is a bug ? Thank you. ### Relevant log output ```shell ``` ### OS Linux ### GPU AMD ### CPU AMD ### Ollama version 0.6.3
GiteaMirror added the needs more infobug labels 2026-04-12 18:14:38 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 30, 2025):

It's not the space. /media/user has permissions only for user. You can do chmod o+x /media/user to allow ollama to access the directory, or add ollama to the user group and do chmod g+x /media/user, or create a BindPaths in the server config file and mount the /media/user/Local Disk/LLM/OllamaModels directory somewhere where ollama can access it.

<!-- gh-comment-id:2764587959 --> @rick-github commented on GitHub (Mar 30, 2025): It's not the space. `/media/user` has permissions only for `user`. You can do `chmod o+x /media/user` to allow ollama to access the directory, or add ollama to the `user` group and do `chmod g+x /media/user`, or create a [`BindPaths`](https://github.com/ollama/ollama/issues/8512#issuecomment-2605177997) in the server config file and mount the `/media/user/Local Disk/LLM/OllamaModels` directory somewhere where ollama can access it.
Author
Owner

@pdevine commented on GitHub (Mar 31, 2025):

@redo33 can you try @rick-github 's suggestion? It seems like the issue is answered but just wanted to make sure you get it sorted.

<!-- gh-comment-id:2767107787 --> @pdevine commented on GitHub (Mar 31, 2025): @redo33 can you try @rick-github 's suggestion? It seems like the issue is answered but just wanted to make sure you get it sorted.
Author
Owner

@redo33 commented on GitHub (Mar 31, 2025):

Thank you very much.

It is the access right problem. In Ubuntu, I added the group users to the LLM folder of the NTFS drive.

However, to avoid the confusion, could the Ollama error message contains the whole path string.

<!-- gh-comment-id:2767646060 --> @redo33 commented on GitHub (Mar 31, 2025): Thank you very much. It is the access right problem. In Ubuntu, I added the group `users` to the LLM folder of the NTFS drive. However, to avoid the confusion, could the Ollama error message contains the whole path string.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#6589