[GH-ISSUE #846] Can't access model information in fresh (botched?) Linux (Ubuntu 22.04 LTS) install #26165

Closed
opened 2026-04-22 02:13:48 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @TM-hub on GitHub (Oct 19, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/846

Step1, run linux install script in terminal window
$curl https://ollama.ai/install.sh | sh

Step 2, install ollama model in the same terminal window
$ollama run mistral

Model is installed to /usr/share/ollama/.ollama owned by ollama:ollama.
>>>/show template
Fails with message ~"can't access /home/USER/.ollama"

Step 3, try adding my user to group ollama to get access to model info
$sudo usermod -a -G ollama
Open new terminal window and still can't access /usr/share/ollama as I can't be added to the group without access to ollama's home directory (/usr/share/ollama).

WORKAROUND
Step 4, Edited /etc/passwd to change ollama's home directory to /home/USER
Models are still installed to /usr/share/ollama/.ollama but I can now access, e.g. --template

QUESTIONS
Is the ollama home directory supposed to be in /home/USER?
How do I change it from /usr/share/ollama?

Linux install.sh should warn the user to close terminal before running ollama for the first time.

Originally created by @TM-hub on GitHub (Oct 19, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/846 Step1, run linux install script in terminal window $curl https://ollama.ai/install.sh | sh Step 2, install ollama model ***in the same terminal window*** $ollama run mistral Model is installed to /usr/share/ollama/.ollama owned by ollama:ollama. >>>/show template Fails with message ~"can't access /home/USER/.ollama" Step 3, try adding my user to group ollama to get access to model info $sudo usermod -a -G ollama <user> Open new terminal window and still can't access /usr/share/ollama as I can't be added to the group without access to ollama's home directory (/usr/share/ollama). WORKAROUND Step 4, Edited /etc/passwd to change ollama's home directory to /home/USER Models are still installed to /usr/share/ollama/.ollama but I can now access, e.g. --template QUESTIONS Is the ollama home directory supposed to be in /home/USER? How do I change it from /usr/share/ollama? Linux install.sh should warn the user to close terminal before running ollama for the first time.
Author
Owner

@mxyng commented on GitHub (Oct 19, 2023):

This is a bug with /show where it uses server functions directly instead of making a call to the API. It's fixed in https://github.com/jmorganca/ollama/pull/778 and should be in the next release

<!-- gh-comment-id:1771771146 --> @mxyng commented on GitHub (Oct 19, 2023): This is a bug with `/show` where it uses server functions directly instead of making a call to the API. It's fixed in https://github.com/jmorganca/ollama/pull/778 and should be in the next release
Author
Owner

@TM-hub commented on GitHub (Oct 19, 2023):

Thank you for the reply mxyng.

Is /usr/share/ollama the intended location for OLLAMAHOME?
If so, the ownership ollama:ollama and permissions (drwxr-x---) are problematic.
I had to use lsof -u ollama to find the hidden, unreadable directory where the models are stored.
Why have hidden directories in /usr/share?

<!-- gh-comment-id:1771787846 --> @TM-hub commented on GitHub (Oct 19, 2023): Thank you for the reply mxyng. Is /usr/share/ollama the intended location for OLLAMAHOME? If so, the ownership ollama:ollama and permissions (drwxr-x---) are problematic. I had to use lsof -u ollama to find the hidden, unreadable directory where the models are stored. Why have hidden directories in /usr/share?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26165