<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://freemwiki.com/index.php?action=history&amp;feed=atom&amp;title=Openai%2F691353e9-c8e4-8002-9ea3-93ea859a8d5c</id>
	<title>Openai/691353e9-c8e4-8002-9ea3-93ea859a8d5c - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://freemwiki.com/index.php?action=history&amp;feed=atom&amp;title=Openai%2F691353e9-c8e4-8002-9ea3-93ea859a8d5c"/>
	<link rel="alternate" type="text/html" href="https://freemwiki.com/index.php?title=Openai/691353e9-c8e4-8002-9ea3-93ea859a8d5c&amp;action=history"/>
	<updated>2026-04-17T04:27:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://freemwiki.com/index.php?title=Openai/691353e9-c8e4-8002-9ea3-93ea859a8d5c&amp;diff=593031&amp;oldid=prev</id>
		<title>Lukegao: 导入ChatGPT Share对话 691353e9...</title>
		<link rel="alternate" type="text/html" href="https://freemwiki.com/index.php?title=Openai/691353e9-c8e4-8002-9ea3-93ea859a8d5c&amp;diff=593031&amp;oldid=prev"/>
		<updated>2025-11-12T05:28:05Z</updated>

		<summary type="html">&lt;p&gt;导入ChatGPT Share对话 691353e9...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{{DISPLAYTITLE:Immich CLI permission fix}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;This conversation was exported from ChatGPT&amp;#039;&amp;#039;&amp;lt;ref&amp;gt;{{cite web|title=Immich CLI permission fix|url=https://chatgpt.com/share/691353e9-c8e4-8002-9ea3-93ea859a8d5c|publisher=ChatGPT|access-date=2025-11-12}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== gpt-5 ==&lt;br /&gt;
=== User:  ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Assistant: That screenshot sums up a very common gotcha when running Immich’s CLI inside a TrueNAS-managed container. ===&lt;br /&gt;
That screenshot sums up a very common gotcha when running Immich’s CLI inside a TrueNAS-managed container. The key line is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;Error: EACCES: permission denied, mkdir &amp;#039;./.config&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Here’s how to fix or work around it.&lt;br /&gt;
&lt;br /&gt;
===== 1. Understand what’s happening =====&lt;br /&gt;
&lt;br /&gt;
The Immich CLI stores its authentication tokens in ~/.config/immich by default.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
So, it’s not the NAS mount at all — it’s a local write permission problem for that .config folder.&lt;br /&gt;
&lt;br /&gt;
===== 2. Quick fix =====&lt;br /&gt;
&lt;br /&gt;
Run the command with a writable config path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;immich --config /tmp/immich-cli-config login&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or, if you want it persistent:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;mkdir -p /mnt/photos/immich-cli-config&lt;br /&gt;
chmod 777 /mnt/photos/immich-cli-config&lt;br /&gt;
immich --config /mnt/photos/immich-cli-config login&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That tells Immich CLI to store its auth/session info somewhere you actually control.&lt;br /&gt;
&lt;br /&gt;
===== 3. Permanent solution for TrueNAS =====&lt;br /&gt;
&lt;br /&gt;
If you’re running the CLI inside the TrueNAS Immich App shell:&lt;br /&gt;
* Add a writable mount for CLI configs, for example: - Host path: /mnt/tank/immich/config - Container path: /config&lt;br /&gt;
* Then run: ``&amp;lt;code&amp;gt;bash immich --config /config/cli login &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
This prevents it from ever touching /usr/src/app again.&lt;br /&gt;
&lt;br /&gt;
===== 4. Sanity check =====&lt;br /&gt;
&lt;br /&gt;
You can verify where it’s trying to write by running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;bash&lt;br /&gt;
echo $HOME&lt;br /&gt;
pwd&lt;br /&gt;
ls -ld .&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
If $HOME is unset or points to /, that’s the smoking gun. You can set it temporarily with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;bash&lt;br /&gt;
export HOME=/tmp&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
===== 5. Bonus: Running CLI from outside the container =====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;bash&lt;br /&gt;
immich --server http://&amp;lt;immich_host&amp;gt;:2283&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;``&lt;br /&gt;
&lt;br /&gt;
It doesn’t have to run inside the same container.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ChatGPT Shares]]&lt;br /&gt;
[[Category:openai]]&lt;/div&gt;</summary>
		<author><name>Lukegao</name></author>
	</entry>
</feed>