Upload Folder not working with CIFS #3897

Closed
opened 2026-02-05 09:25:52 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @cfelicio on GitHub (Jul 17, 2024).

The bug

I'm trying to move away from using an external library to using the upload feature with CIFS share. This functionality seems to work for the external library, but when used with the upload feature, Immich seems to have difficulty with permissions. When I upload an asset, it shows like this on the interface:

image

Checking the folder structure, the uploaded file is still present under the "upload folder", while the library folder remains empty:

image

I tried to make this work with 2 separate setups: One is using Ubuntu 22.02 as the Docker Host, and the other is using Debian 12. I tried to connect to NFS and CIFS on Truenas, as well as CIFS on Windows.

All these exhibit the same behavior. Folders get created under upload, the library folder gets created, but then it stops. Nothing shows up under the immich server log.

The OS that Immich Server is running on

Ubuntu 22.04.3 LTS and Debian Bookworm

Version of Immich Server

v1.108.0

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - nas-share-windows:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

volumes:
  pgdata:
  model-cache:
  #nas-share-truenas: 
    #driver: local
    #driver_opts:
      #type: cifs
      #device: //truenas.lan/Immich
      #o: addr=truenas.lan,vers=3.0,username=immich,password=...,file_mode=0777,dir_mode=0777
      #type: nfs
      #device: :/mnt/WD18TB/Immich
      #o: addr=truenas.lan,nolock,soft,rw,nfsvers=4.1
  nas-share-windows:
    driver_opts:
      type: cifs
      o: "username=.,password=.,addr=.,vers=3.0,file_mode=0777,dir_mode=0777"
      device: "//zzz/immich/pics/"

Your .env content

UPLOAD_LOCATION=immich
IMMICH_VERSION=release
TYPESENSE_API_KEY=...
DB_PASSWORD=...
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

1 - upload photo via the web interface
2 - refresh page
3 - note broken thumbnail
4 - note file got uploaded, but not moved to the correct location

Relevant log output

No response

Additional information

Seems like people were able to make this work in the past:

https://www.reddit.com/r/immich/comments/1dshkue/how_do_i_tell_immich_to_use_a_network_share_as/

Originally created by @cfelicio on GitHub (Jul 17, 2024). ### The bug I'm trying to move away from using an external library to using the upload feature with CIFS share. This functionality seems to work for the external library, but when used with the upload feature, Immich seems to have difficulty with permissions. When I upload an asset, it shows like this on the interface: ![image](https://github.com/user-attachments/assets/26cc4a2c-fdb8-4e8f-93a8-bdc4805f12d8) Checking the folder structure, the uploaded file is still present under the "upload folder", while the library folder remains empty: ![image](https://github.com/user-attachments/assets/96ccfce7-91af-4452-9b27-ca1cd0098ffc) I tried to make this work with 2 separate setups: One is using Ubuntu 22.02 as the Docker Host, and the other is using Debian 12. I tried to connect to NFS and CIFS on Truenas, as well as CIFS on Windows. All these exhibit the same behavior. Folders get created under upload, the library folder gets created, but then it stops. Nothing shows up under the immich server log. ### The OS that Immich Server is running on Ubuntu 22.04.3 LTS and Debian Bookworm ### Version of Immich Server v1.108.0 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ['start.sh', 'immich'] volumes: - nas-share-windows:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - 2283:3001 depends_on: - redis - database restart: always labels: - "com.centurylinklabs.watchtower.enable=true" immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - stack.env restart: always labels: - "com.centurylinklabs.watchtower.enable=true" redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always labels: - "com.centurylinklabs.watchtower.enable=true" database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.2.0 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always labels: - "com.centurylinklabs.watchtower.enable=true" volumes: pgdata: model-cache: #nas-share-truenas: #driver: local #driver_opts: #type: cifs #device: //truenas.lan/Immich #o: addr=truenas.lan,vers=3.0,username=immich,password=...,file_mode=0777,dir_mode=0777 #type: nfs #device: :/mnt/WD18TB/Immich #o: addr=truenas.lan,nolock,soft,rw,nfsvers=4.1 nas-share-windows: driver_opts: type: cifs o: "username=.,password=.,addr=.,vers=3.0,file_mode=0777,dir_mode=0777" device: "//zzz/immich/pics/" ``` ### Your .env content ```Shell UPLOAD_LOCATION=immich IMMICH_VERSION=release TYPESENSE_API_KEY=... DB_PASSWORD=... DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1 - upload photo via the web interface 2 - refresh page 3 - note broken thumbnail 4 - note file got uploaded, but not moved to the correct location ``` ### Relevant log output _No response_ ### Additional information Seems like people were able to make this work in the past: https://www.reddit.com/r/immich/comments/1dshkue/how_do_i_tell_immich_to_use_a_network_share_as/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3897