• 0 Posts
  • 1 Comment
Joined 2 years ago
cake
Cake day: August 16th, 2023

help-circle
  • You can configure samba to handle the permissions, but immich will need to connect to the user’s share using their password (no ideal)

    In smb.conf for each user’s share

    [user_media]
       path = /path/to/user/media
       valid users = username, immich
       force user = username  # This makes all files.  appear as owned by the user
       force group = media
       create mask = 0660
       directory mask = 0770
    

    Alternatively you can use setguid with your media group:

    chmod g+s /path/to/media/dirs
    chown -R :media /path/to/media/dirs
    chmod 2770 /path/to/media/dirs. (2 = SetGID, 770 = rwx for user and group)
    
    • Any new file created by Immich will automatically belong to the media group
    • The SetGID bit ensures files inherit the parent directory’s group
    • All users (including Immich) can read/write files as long as they’re in the media group
    • Individual users still “own” their files (UID stays as the original user when they upload via Samba)