Skip to content

Instantly share code, notes, and snippets.

@brunos3d
Last active January 27, 2025 18:33
Show Gist options
  • Save brunos3d/7f74cc072ab2edc4c30402aa36d99d72 to your computer and use it in GitHub Desktop.
Save brunos3d/7f74cc072ab2edc4c30402aa36d99d72 to your computer and use it in GitHub Desktop.
fucking fix your ollama pull: permission denied error

Just replace PATH_TO_YOUR_MODELS with the absolute (or relative) path to your ollama models directory (usually /usr/share/ollama/.ollama/models/)

sudo find PATH_TO_YOUR_MODELS -type f -exec chown ollama:ollama {} \;
sudo find PATH_TO_YOUR_MODELS -type d -exec chown ollama:ollama {} \;
sudo find PATH_TO_YOUR_MODELS -type f -exec chmod 644 {} \;
sudo find PATH_TO_YOUR_MODELS -type d -exec chmod 755 {} \;

PS: kudos for Jeron_Baffom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment