I
Immich•2w ago
anlsh

Configuring immich to use rclone mount for library: permissions errors

Hey, so I'm having trouble getting dockerized immich to run with an rclone-mounted library: was hoping I could get some help Here's my process
// Create the mount point
# mkdir /pictures
# ls -lh pictures
total 8
drwxr-xr-x 2 root root 4096 Nov 11 05:37 .
drwxr-xr-x 22 root root 4096 Nov 11 05:37 ..

// Mount the directory with rclone
# /usr/bin/rclone mount --allow-other backblaze-pics:picture-storage /pictures --config ${MY_RCLONE_CONF_FILE}
// Create the mount point
# mkdir /pictures
# ls -lh pictures
total 8
drwxr-xr-x 2 root root 4096 Nov 11 05:37 .
drwxr-xr-x 22 root root 4096 Nov 11 05:37 ..

// Mount the directory with rclone
# /usr/bin/rclone mount --allow-other backblaze-pics:picture-storage /pictures --config ${MY_RCLONE_CONF_FILE}
At this point the mount seems to be working properly: I can create files, unmount, remount, see the expected contents, etc
// test.txt is something I created manually
# ls -ls /pictures
total 5
drwxr-xr-x 1 root root 0 Nov 11 05:41 .
drwxr-xr-x 22 root root 4096 Nov 11 05:37 ..
-rw-r--r-- 1 root root 10 Nov 10 10:17 test.txt
// test.txt is something I created manually
# ls -ls /pictures
total 5
drwxr-xr-x 1 root root 0 Nov 11 05:41 .
drwxr-xr-x 22 root root 4096 Nov 11 05:37 ..
-rw-r--r-- 1 root root 10 Nov 10 10:17 test.txt
So, it seems like I should be just about good to go. I set UPLOAD_DIR appropriatly in the .env file
// Note: "immich" subdirectory is not created yet
UPLOAD_LOCATION=/pictures/immich
// Note: "immich" subdirectory is not created yet
UPLOAD_LOCATION=/pictures/immich
but when I start the container, I see an error about being unable to read .immich files (continued in next comment due to character limit)
5 Replies
Immich
Immich•2w ago
:wave: Hey @anlsh, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
anlsh
anlshOP•2w ago
// From the directory with .env and docker-compose file
# docker compose up
// A bunch of output and then...
immich_server | [Nest] 7 - 11/11/2025, 5:52:51 AM ERROR [Microservices:StorageService] Failed to read (/data/encoded-video/.immich): Error: ENOENT: no such file or directory, open '/data/encoded-video/.immich'
immich_server | microservices worker error: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information."
immich_server | at StorageService.verifyReadAccess (/usr/src/app/server/dist/services/storage.service.js:129:19)
immich_server | at async /usr/src/app/server/dist/services/storage.service.js:56:21
immich_server | at async /usr/src/app/server/dist/repositories/database.repository.js:379:27
immich_server | at async /usr/src/app/server/node_modules/.pnpm/kysely@0.28.2/node_modules/kysely/dist/cjs/kysely.js:535:20
immich_server | at async DefaultConnectionProvider.provideConnection (/usr/src/app/server/node_modules/.pnpm/kysely@0.28.2/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
immich_server | at async /usr/src/app/server/dist/repositories/database.repository.js:376:13
immich_server | microservices worker exited with code 1
immich_server | Killing api process
// From the directory with .env and docker-compose file
# docker compose up
// A bunch of output and then...
immich_server | [Nest] 7 - 11/11/2025, 5:52:51 AM ERROR [Microservices:StorageService] Failed to read (/data/encoded-video/.immich): Error: ENOENT: no such file or directory, open '/data/encoded-video/.immich'
immich_server | microservices worker error: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information."
immich_server | at StorageService.verifyReadAccess (/usr/src/app/server/dist/services/storage.service.js:129:19)
immich_server | at async /usr/src/app/server/dist/services/storage.service.js:56:21
immich_server | at async /usr/src/app/server/dist/repositories/database.repository.js:379:27
immich_server | at async /usr/src/app/server/node_modules/.pnpm/kysely@0.28.2/node_modules/kysely/dist/cjs/kysely.js:535:20
immich_server | at async DefaultConnectionProvider.provideConnection (/usr/src/app/server/node_modules/.pnpm/kysely@0.28.2/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
immich_server | at async /usr/src/app/server/dist/repositories/database.repository.js:376:13
immich_server | microservices worker exited with code 1
immich_server | Killing api process
Now strangely, the container does manage to create the immich folder
# ls -lah /pictures
total 4.5K
drwxr-xr-x 1 root root 0 Nov 11 05:51 .
drwxr-xr-x 22 root root 4.0K Nov 11 05:37 ..
-rw-r--r-- 1 root root 10 Nov 10 10:17 test.txt
drwxr-xr-x 1 root root 0 Nov 11 05:51 immich

# ls -lah /pictures/immich/
total 0
drwxr-xr-x 1 root root 0 Nov 11 05:51 .
drwxr-xr-x 1 root root 0 Nov 11 05:51 ..
# ls -lah /pictures
total 4.5K
drwxr-xr-x 1 root root 0 Nov 11 05:51 .
drwxr-xr-x 22 root root 4.0K Nov 11 05:37 ..
-rw-r--r-- 1 root root 10 Nov 10 10:17 test.txt
drwxr-xr-x 1 root root 0 Nov 11 05:51 immich

# ls -lah /pictures/immich/
total 0
drwxr-xr-x 1 root root 0 Nov 11 05:51 .
drwxr-xr-x 1 root root 0 Nov 11 05:51 ..
So... what gives? It must be basic, but I'm unsure what the issue actually is 😢
bo0tzz
bo0tzz•2w ago
Did you read the link? It's checking for those files and not finding them. You either need to move over the existing files or wipe the database
anlsh
anlshOP•2w ago
I did. didn't make the connection between the postgres database and the library being out of sync though. So I rm -rfd my UPLOAD_DIR and POSTGRES_DATA_DIR (or whatever those variables are called 🙂 and reran docker compose up Now it gets farther, but still hits a permission error
Nov 11 07:38:51 12rocks docker[337303]: immich_server | [Nest] 7 - 11/11/2025, 7:38:51 AM ERROR [Microservices:StorageService] Failed to write /data/encoded-video/.immich: AggregateError: EPERM: operation not permitted, write
Nov 11 07:38:51 12rocks docker[337303]: immich_server | microservices worker error: Error: Failed to write "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to write "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information."
Nov 11 07:38:51 12rocks docker[337303]: immich_server | [Nest] 7 - 11/11/2025, 7:38:51 AM ERROR [Microservices:StorageService] Failed to write /data/encoded-video/.immich: AggregateError: EPERM: operation not permitted, write
Nov 11 07:38:51 12rocks docker[337303]: immich_server | microservices worker error: Error: Failed to write "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to write "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information."
This time though the contents of the library do look different (not only is /pictures/immich created but there's an encoded-videos folder as well)
# ls -lah /pictures/immich/
total 0
drwxr-xr-x 1 root root 0 Jan 1 2000 .
drwxr-xr-x 1 root root 0 Nov 11 07:34 ..
drwxr-xr-x 1 root root 0 Jan 1 2000 encoded-video

# ls -lah /pictures/immich/encoded-video/
total 512
drwxr-xr-x 1 root root 0 Jan 1 2000 .
drwxr-xr-x 1 root root 0 Jan 1 2000 ..
-rw-r--r-- 1 root root 13 Nov 11 07:34 .immich
# ls -lah /pictures/immich/
total 0
drwxr-xr-x 1 root root 0 Jan 1 2000 .
drwxr-xr-x 1 root root 0 Nov 11 07:34 ..
drwxr-xr-x 1 root root 0 Jan 1 2000 encoded-video

# ls -lah /pictures/immich/encoded-video/
total 512
drwxr-xr-x 1 root root 0 Jan 1 2000 .
drwxr-xr-x 1 root root 0 Jan 1 2000 ..
-rw-r--r-- 1 root root 13 Nov 11 07:34 .immich
The permissions on that .immich file definitely look suspicious
Mraedis
Mraedis•2w ago
I'd say the date on those folders look suspicious

Did you find this page helpful?