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
This commit is contained in:
parent
51c5d9a23e
commit
59f73830fb
1 changed files with 5 additions and 0 deletions
|
|
@ -195,6 +195,11 @@ case "$AI_CHOICE" in
|
||||||
info "Installing Ollama..."
|
info "Installing Ollama..."
|
||||||
if ! command -v ollama &>/dev/null; then
|
if ! command -v ollama &>/dev/null; then
|
||||||
sudo_if sh -c "$(curl -fsSL https://ollama.com/install.sh)" 2>&1 | tail -5
|
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
|
else
|
||||||
info "Ollama already installed"
|
info "Ollama already installed"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue