[GH-ISSUE #851] macOS: Installing CLI from DMG should NOT require administrator privileges #408

Closed
opened 2026-04-12 10:04:03 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @coolaj86 on GitHub (Oct 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/851

As a matter of security, would you adjust the Mac installer to install to the standard user location of ~/.local/bin/ and not require administrator privileges?

I'm not that familiar with DMG installers, but I can provide shell script examples (or write whatever is needed in full) for ensuring that the executable is installed properly with the correct PATH across the various shells (sh, bash, zsh, fish, etc) without requiring admin privileges.

Originally created by @coolaj86 on GitHub (Oct 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/851 As a matter of security, would you adjust the Mac installer to install to the standard user location of `~/.local/bin/` and not require administrator privileges? I'm not that familiar with DMG installers, but I can provide shell script examples (or write whatever is needed in full) for ensuring that the executable is installed properly with the correct PATH across the various shells (sh, bash, zsh, fish, etc) without requiring admin privileges.
Author
Owner

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

The macOS app requires superuser privileges once to install a symlink to /usr/local/bin which is in the PATH on macOS. ~/.local/bin isn't in the PATH so it'll require additional configurations to use make ollama work out of the box.

<!-- gh-comment-id:1779885366 --> @mxyng commented on GitHub (Oct 25, 2023): The macOS app requires superuser privileges once to install a symlink to `/usr/local/bin` which is in the PATH on macOS. `~/.local/bin` isn't in the PATH so it'll require additional configurations to use make ollama work out of the box.
Author
Owner

@gardner commented on GitHub (Jan 7, 2024):

I definitely don't want to give administrator access to a random binary that was downloaded off the internet. There are other options for installing a command line tool. I manually symlinked the binary to an appropriate place. Now I can't get passed this screen:

image

I understand wanting to make it easy for the LCD but having a way to bypass the screen without giving admin privileges could be a good compromise. For now, I have just removed Ollama.

<!-- gh-comment-id:1879897457 --> @gardner commented on GitHub (Jan 7, 2024): I definitely don't want to give administrator access to a random binary that was downloaded off the internet. There are other options for installing a command line tool. I manually symlinked the binary to an appropriate place. Now I can't get passed this screen: <img width="399" alt="image" src="https://github.com/jmorganca/ollama/assets/787026/34dc8ba8-b026-49de-a2d9-45368047e606"> I understand wanting to make it easy for the LCD but having a way to bypass the screen without giving admin privileges could be a good compromise. For now, I have just removed Ollama.
Author
Owner

@bernie43 commented on GitHub (Jan 12, 2024):

I also wasn't gonna give administrator privileges to an app that has no good reason to request them.

After manually symlinking the binary with
ln -s /Applications/Ollama.app/Contents/Resources/ollama /usr/local/bin

you can get rid of the install screen, by adding the following to ~/Library/Application Support/Ollama/config.json:
"first-time-run": true

But then it turns out the app actually has no UI, it just sits in the menu bar.

I'm curious why you guys needed to implement this whole overhead with an Electron app for this? AFAIK this is just a CLI tool?

<!-- gh-comment-id:1889808636 --> @bernie43 commented on GitHub (Jan 12, 2024): I also wasn't gonna give administrator privileges to an app that has no good reason to request them. After manually symlinking the binary with `ln -s /Applications/Ollama.app/Contents/Resources/ollama /usr/local/bin` you can get rid of the install screen, by adding the following to `~/Library/Application Support/Ollama/config.json`: `"first-time-run": true` But then it turns out the app actually has no UI, it just sits in the menu bar. I'm curious why you guys needed to implement this whole overhead with an Electron app for this? AFAIK this is just a CLI tool?
Author
Owner

@gardner commented on GitHub (Jan 17, 2024):

If you arrived here hoping to be able to install ollama without granting admin privileges then please check out the homebrew package: https://formulae.brew.sh/formula/ollama

<!-- gh-comment-id:1894880001 --> @gardner commented on GitHub (Jan 17, 2024): If you arrived here hoping to be able to install ollama without granting admin privileges then please check out the homebrew package: https://formulae.brew.sh/formula/ollama
Author
Owner

@iwinux commented on GitHub (Jun 25, 2024):

The ollama-darwin binary for macOS is just 52MB. Bundled with Electron: 400MB+. So much for a menu bar icon 🤣

<!-- gh-comment-id:2188048374 --> @iwinux commented on GitHub (Jun 25, 2024): The `ollama-darwin` binary for macOS is just 52MB. Bundled with Electron: 400MB+. So much for a menu bar icon 🤣
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#408