From 59f73830fbc766cc6accc155444ce3aa618221b6 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 16:45:00 +0000 Subject: [PATCH] fix: chown /usr/share/ollama after install so ollama user can write to it - The Ollama installer run via sudo leaves /usr/share/ollama owned by root - The ollama service runs as the ollama user and needs write access - Added chown after installation to fix permissions --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 1f3823f..c42a4a2 100755 --- a/install.sh +++ b/install.sh @@ -195,6 +195,11 @@ case "$AI_CHOICE" in info "Installing Ollama..." if ! command -v ollama &>/dev/null; then sudo_if sh -c "$(curl -fsSL https://ollama.com/install.sh)" 2>&1 | tail -5 + # Fix permissions: the installer may leave /usr/share/ollama owned by root + # when run via sudo, but the ollama service runs as the ollama user + if id -u ollama &>/dev/null; then + sudo_if chown -R ollama:ollama /usr/share/ollama 2>/dev/null || true + fi else info "Ollama already installed" fi