[GH-ISSUE #4027] Specify the user's customized workspace #2498

Closed
opened 2026-04-12 12:49:28 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @shanewa on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4027

Originally assigned to: @dhiltgen on GitHub.

I got an issue when I run ollama in our special server which has been configured to ban any executable executions under /tmp dir. Is it possible to use other dir for below command?

# ollama run phi3
Error: error starting the external llama server: fork/exec /tmp/ollama2436530018/runners/cpu_avx2/ollama_llama_server: permission denied

I would like the ollama run to have the options like --workspace or support to use Shell variable to achieve this.

ollama run phi3 --workspace /storage/shanewa/workspace
Originally created by @shanewa on GitHub (Apr 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4027 Originally assigned to: @dhiltgen on GitHub. I got an issue when I run ollama in our special server which has been configured to ban any executable executions under `/tmp` dir. Is it possible to use other dir for below command? ``` # ollama run phi3 Error: error starting the external llama server: fork/exec /tmp/ollama2436530018/runners/cpu_avx2/ollama_llama_server: permission denied ``` I would like the ollama run to have the options like `--workspace` or support to use Shell variable to achieve this. ``` ollama run phi3 --workspace /storage/shanewa/workspace ```
GiteaMirror added the feature request label 2026-04-12 12:49:28 -05:00
Author
Owner

@pdevine commented on GitHub (Apr 29, 2024):

I think --workspace would be really complicated for most people to know, however I believe this should be fixed already (i.e. it won't execute from a tmp directory) on Windows.

<!-- gh-comment-id:2083844675 --> @pdevine commented on GitHub (Apr 29, 2024): I think `--workspace` would be really complicated for most people to know, however I believe this should be fixed already (i.e. it won't execute from a tmp directory) on Windows.
Author
Owner

@shanewa commented on GitHub (Apr 30, 2024):

We mount /tmp without executable permissions based on the security features. I'm finding the way to change ollama_llama_server location.

vi /etc/fstab
tmpfs     /dev/shm        tmpfs   noexec,nosuid,nodev       0 0
<!-- gh-comment-id:2083936897 --> @shanewa commented on GitHub (Apr 30, 2024): We mount `/tmp` without executable permissions based on the security features. I'm finding the way to change `ollama_llama_server` location. ``` vi /etc/fstab tmpfs /dev/shm tmpfs noexec,nosuid,nodev 0 0 ```
Author
Owner

@shanewa commented on GitHub (Apr 30, 2024):

I think --workspace would be really complicated for most people to know, however I believe this should be fixed already (i.e. it won't execute from a tmp directory) on Windows.

Thanks for the information but I'm using the Linux version and it is still put the server under /tmp.

# ollama --version
ollama version is 0.1.32
<!-- gh-comment-id:2083939356 --> @shanewa commented on GitHub (Apr 30, 2024): > I think `--workspace` would be really complicated for most people to know, however I believe this should be fixed already (i.e. it won't execute from a tmp directory) on Windows. Thanks for the information but I'm using the Linux version and it is still put the server under `/tmp`. ``` # ollama --version ollama version is 0.1.32 ```
Author
Owner

@dhiltgen commented on GitHub (May 1, 2024):

The location of tmp storage can be adjusted via an environment variable. See https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#linux-tmp-noexec

<!-- gh-comment-id:2088738275 --> @dhiltgen commented on GitHub (May 1, 2024): The location of tmp storage can be adjusted via an environment variable. See https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#linux-tmp-noexec
Author
Owner

@shanewa commented on GitHub (May 3, 2024):

@dhiltgen Great! I didn't read this part. Thanks for your information.

<!-- gh-comment-id:2091938756 --> @shanewa commented on GitHub (May 3, 2024): @dhiltgen Great! I didn't read this part. Thanks for your information.
Author
Owner

@dhiltgen commented on GitHub (May 3, 2024):

We may adjust our packaging model in the future to no longer extract executables into a temporary location (already transitioned to this on Windows), but until then, that troubleshooting guide is the workaround.

<!-- gh-comment-id:2093812983 --> @dhiltgen commented on GitHub (May 3, 2024): We may adjust our packaging model in the future to no longer extract executables into a temporary location (already transitioned to this on Windows), but until then, that troubleshooting guide is the workaround.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2498