[GH-ISSUE #1113] I am trying to Create Model File But I am getting permission Denied Error. #26320

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

Originally created by @Sridatta0808 on GitHub (Nov 13, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1113

Originally assigned to: @mxyng on GitHub.

Project Structure :

bin/
src/
models/
requirements.txt
Readme.md

Steps Followed:
$ nano Modelfile - > Inserted -> FROM ./models/mistral-7b-instruct-v0.1.Q3_K_M.gguf
$ ollama create example -f Modelfile

-> Returns Following Error :
couldn't open modelfile '/home/sridatta/projects/basic_llm/langchain/Modelfile' Error: failed to open file: open /home/sridatta/projects/basic_llm/langchain/Modelfile: permission denied

Tried the below approach Approache :
-> chmod -R o+rx Modelfile path (DIDNT WORK)

For any one please let me know how to load GGUF model to ollama chat.
Thanks in advance.

Originally created by @Sridatta0808 on GitHub (Nov 13, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1113 Originally assigned to: @mxyng on GitHub. Project Structure : bin/ src/ models/ requirements.txt Readme.md Steps Followed: $ nano Modelfile - > Inserted -> FROM ./models/mistral-7b-instruct-v0.1.Q3_K_M.gguf $ ollama create example -f Modelfile -> Returns Following Error : couldn't open modelfile '/home/sridatta/projects/basic_llm/langchain/Modelfile' Error: failed to open file: open /home/sridatta/projects/basic_llm/langchain/Modelfile: permission denied Tried the below approach Approache : -> chmod -R o+rx Modelfile path (DIDNT WORK) For any one please let me know how to load GGUF model to ollama chat. Thanks in advance.
Author
Owner

@BruceMacD commented on GitHub (Nov 13, 2023):

Hey @Sridatta0808, thanks for opening the issue. The way we install Ollama on linux has some file permissions issues, a fix is underway in #898.

A workaround in the meantime will be to move the Modelfile and gguf file to /usr/share/ollama so that the Ollama service user can access them.

<!-- gh-comment-id:1809067424 --> @BruceMacD commented on GitHub (Nov 13, 2023): Hey @Sridatta0808, thanks for opening the issue. The way we install Ollama on linux has some file permissions issues, a fix is underway in #898. A workaround in the meantime will be to move the Modelfile and gguf file to `/usr/share/ollama` so that the Ollama service user can access them.
Author
Owner

@MostlyKIGuess commented on GitHub (Nov 14, 2023):

You can also trying adding it to tmp dir or the dir where ollama can access it, it might just work out..

or give perms to Ollama using

usermod -aG ollama $USER
<!-- gh-comment-id:1809512441 --> @MostlyKIGuess commented on GitHub (Nov 14, 2023): You can also trying adding it to tmp dir or the dir where ollama can access it, it might just work out.. or give perms to Ollama using ``` usermod -aG ollama $USER ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26320