Immich app won’t start after cleaning folders (encoded-video, thumbs) – Permission errors

Hi all,

I’m running the Immich app on a dedicated 500GB App pool. I was trying to free up space by manually deleting the contents of the encoded-video and thumbs folders under the .ix-apps location, after tweaking some settings in the Immich UI to reduce transcoding footprint.

After deleting those contents, Immich refuses to start.

I’m getting errors like:

EACCES: permission denied, open ‘upload/profile/.immich’
EISDIR: illegal operation on a directory, read
Failed to write “<UPLOAD_LOCATION>/encoded-video/.immich”

Steps I took:

  • Deleted contents of encoded-video, thumbs, and similar folders
  • Recreated the .immich files using touch, set ownership to UID 568 (chown 568:568) and chmod 664
  • Applied chown and chmod recursively to parent folders (775)
  • The app runs under UID 568 (was UID 0 before – more on this later)
  • Mount point is: /mnt/.ix-apps/app_mounts/immich/uploads/…

Still getting permission denied errors during startup, particularly writing .immich files.

Background:

Recently, I rebuilt my TrueNAS setup and moved the apps to a new SSD-based App pool. More context here:
:point_right: My rebuild thread

I migrated the app following this guide:
:point_right: HowTo: Copy the hidden .ix-apps dataset to another pool

Everything was working fine after the migration.

Later, I noticed the app was running as UID 0, so I corrected it to UID 568 (which Immich expects). Unfortunately, the app still fails to start.

Questions:

WTF have I done?! :sweat_smile:

Thanks in advance for any help or suggestions!

Permissions are a pain when messed up :slight_smile:

if shows not only 568, but also 999 and 0.

I would create a second instance of Immich with folders in a different dataset and see how permissions are set by the app. (I did a second install recently, to see clearly how the new storage structure was)

And using the new storage structure if you are still on the “old” by copying the files over. (there is good thread here too about that).

I managed to solve this issue — don’t ask me how exactly, but it worked…

While I was troubleshooting, I also encountered another error:

Error
Container ix-immich-redis-1 Healthy
dependency failed to start: container ix-immich-pgvecto-1 is unhealthy

I fixed that by rolling back the snapshot of the following dataset:

App/ix-apps/app_mounts/immich/postgres_data

After restoring the snapshot, I manually created the missing hidden files that Immich expects to find in the thumbs and video folders, with these commands:

sudo touch /mnt/.ix-apps/app_mounts/immich/thumbs/.immich
sudo touch /mnt/.ix-apps/app_mounts/immich/video/.immich
sudo chown apps:apps /mnt/.ix-apps/app_mounts/immich/thumbs/.immich
sudo chown apps:apps /mnt/.ix-apps/app_mounts/immich/video/.immich

After that, everything started up fine…

1 Like