Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Immich] <Can't access NAS via SMB -- "folder cannot be written to"> #1576

Open
zd3sf opened this issue Sep 19, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@zd3sf
Copy link

zd3sf commented Sep 19, 2024

Description

Immich fails to initialize when library is located on an SMB share.

HAOS 13.1 running inside hyper-V on windows 10: 192.168.1.110
NAS Windows 10 with SMB shares: 192.168.1.167

Reproduction steps

Addon YAML:
DB_DATABASE_NAME: immich
DB_HOSTNAME: homeassistant.local
DB_PASSWORD: homeassistant
DB_PORT: "5432"
DB_USERNAME: postgres
DISABLE_MACHINE_LEARNING: false
JWT_SECRET: xxxxxxxxxxxxxxxxxxxxxx
PGID: 1000
PUID: 1000
TZ: Europe/Paris
data_location: /mnt/HASS/immich
cifsdomain: WORKGROUP
cifspassword: xxxxxxx
cifsusername: Admin
networkdisks: //192.168.1.167/e/HASS/

Addon Logs

Add-on: Immich
 Self-hosted photo and video backup solution directly from your mobile phone
-----------------------------------------------------------
 Add-on version: 1.115.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.1  (amd64 / qemux86-64)
 Home Assistant Core: 2024.9.2
 Home Assistant Supervisor: 2024.09.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
 Defining permissions for main user : 
User UID: 1000
User GID : 1000
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
DB_DATABASE_NAME='immich'
DB_HOSTNAME='homeassistant.local'
DB_PASSWORD=******
DB_PORT='5432'
DB_USERNAME='postgres'
DISABLE_MACHINE_LEARNING='false'
JWT_SECRET='xxxxxxxxxxxxxxxxx'
PGID='1000'
PUID='1000'
TZ='Europe/Paris'
cifsdomain='WORKGROUP'
cifspassword='xxxxxxxxxxxx'
cifsusername='Admin'
data_location='/mnt/HASS/immich'
networkdisks='//192.168.1.167/e/HASS/'
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
Mounting smb share(s)...
... using domain WORKGROUP
... using PUID 1000 and PGID 1000
... mounting //192.168.1.167/e/HASS
[04:14:33] INFO: ...... //192.168.1.167/e/HASS successfully mounted to /mnt/HASS with options rw,file_mode=0775,dir_mode=0775,username=Admin,password=XXXXXXXXXX,nobrl,uid=1000,gid=1000,iocharset=utf8,domain=WORKGROUP
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory


Load environment variables from /config/addons_config/immich/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/immich/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
privileged='true'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_autoscripts/immich.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/20-folders.sh: executing
[04:14:33] INFO: Setting data location
... check /mnt/HASS/immich folder exists
... setting permissions



[Nest] 3276  - 09/19/2024, 4:07:57 AM     LOG [Api:StorageService] Verifying system mount folder checks
[Nest] 3276  - 09/19/2024, 4:07:57 AM   ERROR [Api:StorageService] Failed to write /mnt/HASS/immich/encoded-video/.immich: Error: EACCES: permission denied, open '/mnt/HASS/immich/encoded-video/.immich'
[Nest] 3276  - 09/19/2024, 4:07:57 AM   ERROR [Api:StorageService] The "encoded-video" folder cannot be written to, please make sure the volume is mounted with the correct permissions
api worker exited with code 1
Starting api worker

Architecture

No response

OS

No response

@zd3sf zd3sf added the bug Something isn't working label Sep 19, 2024
@zd3sf
Copy link
Author

zd3sf commented Sep 20, 2024

Got it to work.

  1. Deleted both addons (immich and postgresql)
  2. Deleted any trace of the database and residual files (important)
  3. From SSH, chmod -R a+rw "Media folder"
  4. install addons back, run as PUID 0, PGID 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant