Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691353e9-c8e4-8002-9ea3-93ea859a8d5c
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{DISPLAYTITLE:Immich CLI permission fix}} ''This conversation was exported from ChatGPT''<ref>{{cite web|title=Immich CLI permission fix|url=https://chatgpt.com/share/691353e9-c8e4-8002-9ea3-93ea859a8d5c|publisher=ChatGPT|access-date=2025-11-12}}</ref> == gpt-5 == === User: === === Assistant: That screenshot sums up a very common gotcha when running Immich’s CLI inside a TrueNAS-managed container. === That screenshot sums up a very common gotcha when running Immich’s CLI inside a TrueNAS-managed container. The key line is: <syntaxhighlight>Error: EACCES: permission denied, mkdir './.config' </syntaxhighlight> That’s not an Immich bug — it’s Node.js (which the Immich CLI is built with) trying to create a configuration directory in its current working directory, which inside a TrueNAS-scale container typically maps to /usr/src/app or /root. If that location isn’t writable by the user the CLI runs as, you get exactly this EACCES error. Here’s how to fix or work around it. ===== 1. Understand what’s happening ===== The Immich CLI stores its authentication tokens in ~/.config/immich by default. But when you execute it inside a TrueNAS App container (especially through the App Shell or Docker exec), you’re often not logged in as root or the environment variables for $HOME aren’t set. That means Node.js falls back to ./.config in the current directory, which is unwritable inside /usr/src/app. So, it’s not the NAS mount at all — it’s a local write permission problem for that .config folder. ===== 2. Quick fix ===== Run the command with a writable config path: <syntaxhighlight lang="bash">immich --config /tmp/immich-cli-config login </syntaxhighlight> or, if you want it persistent: <syntaxhighlight lang="bash">mkdir -p /mnt/photos/immich-cli-config chmod 777 /mnt/photos/immich-cli-config immich --config /mnt/photos/immich-cli-config login </syntaxhighlight> That tells Immich CLI to store its auth/session info somewhere you actually control. ===== 3. Permanent solution for TrueNAS ===== If you’re running the CLI inside the TrueNAS Immich App shell: * Add a writable mount for CLI configs, for example: - Host path: /mnt/tank/immich/config - Container path: /config * Then run: ``<code>bash immich --config /config/cli login <syntaxhighlight> This prevents it from ever touching /usr/src/app again. ===== 4. Sanity check ===== You can verify where it’s trying to write by running: </syntaxhighlight>bash echo $HOME pwd ls -ld . <syntaxhighlight> If $HOME is unset or points to /, that’s the smoking gun. You can set it temporarily with: </syntaxhighlight>bash export HOME=/tmp <syntaxhighlight> ===== 5. Bonus: Running CLI from outside the container ===== You can also skip all this by running the Immich CLI on your host machine (or another Linux VM) and just point it at your Immich instance with: </syntaxhighlight>bash immich --server http://<immich_host>:2283 </code>`` It doesn’t have to run inside the same container. If you show me your current docker exec or TrueNAS App shell command (and whether you’re root or not inside it), I can tell you exactly what to mount or export so it works cleanly every time. == References == <references /> [[Category:ChatGPT Shares]] [[Category:openai]]
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite web
(
edit
)
Module:Citation/CS1
(
edit
)
Module:Citation/CS1/COinS
(
edit
)
Module:Citation/CS1/Configuration
(
edit
)
Module:Citation/CS1/Date validation
(
edit
)
Module:Citation/CS1/Identifiers
(
edit
)
Module:Citation/CS1/Utilities
(
edit
)
Module:Citation/CS1/Whitelist
(
edit
)
Module:Citation/CS1/styles.css
(
edit
)