fix(immich): clarify permission check message

This commit is contained in:
Alexandre
2025-08-19 08:23:46 +02:00
parent 4f95d34d56
commit 802768eb3e
13 changed files with 32 additions and 11 deletions

View File

@@ -1,3 +1,5 @@
## 1.138.0-1 (19-08-2025)
- New option : skip_permissions_check to skip permissions check
## 1.138.0 (16-08-2025) ## 1.138.0 (16-08-2025)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases) - Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -54,6 +54,7 @@ Webui can be found at `<your-ip>:8080`. PostgreSQL/MySQL can be either internal
| `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features | | `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features |
| `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers | | `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers |
| `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) | | `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) |
| `skip_permissions_check` | bool | `false` | Skip file permissions checking |
### Example Configuration ### Example Configuration

View File

@@ -138,7 +138,8 @@
"data_location": "str", "data_location": "str",
"library_location": "str?", "library_location": "str?",
"localdisks": "str?", "localdisks": "str?",
"networkdisks": "str?" "networkdisks": "str?",
"skip_permissions_check": "bool?"
}, },
"services": [ "services": [
"mysql:want" "mysql:want"

View File

@@ -41,21 +41,26 @@ printf "%s\n" "IMMICH_MEDIA_LOCATION=\"$DATA_LOCATION\"" >> ~/.bashrc
echo "... check $DATA_LOCATION folder exists" echo "... check $DATA_LOCATION folder exists"
mkdir -p "$DATA_LOCATION" mkdir -p "$DATA_LOCATION"
echo "... setting permissions"
chown -R "$PUID":"$PGID" "$DATA_LOCATION"
echo "... correcting official script" echo "... correcting official script"
# shellcheck disable=SC2013 # shellcheck disable=SC2013
for file in $(grep -sril '/photos' /etc); do sed -i "s|/photos|$DATA_LOCATION|g" "$file"; done for file in $(grep -sril '/photos' /etc); do sed -i "s|/photos|$DATA_LOCATION|g" "$file"; done
if [ -f /photos ]; then rm -r /photos; fi if [ -f /photos ]; then rm -r /photos; fi
ln -sf "$DATA_LOCATION" /photos ln -sf "$DATA_LOCATION" /photos
chown "$PUID":"$PGID" /photos
mkdir -p "$MACHINE_LEARNING_CACHE_FOLDER" mkdir -p "$MACHINE_LEARNING_CACHE_FOLDER"
mkdir -p "$REVERSE_GEOCODING_DUMP_DIRECTORY" mkdir -p "$REVERSE_GEOCODING_DUMP_DIRECTORY"
chown -R "$PUID":"$PGID" "$MACHINE_LEARNING_CACHE_FOLDER"
chown -R "$PUID":"$PGID" "$REVERSE_GEOCODING_DUMP_DIRECTORY" if ! bashio::config.true "skip_permissions_check" && [ "${PUID:-0}" != "0" ] && [ "${PGID:-0}" != "0" ]; then
chown -R "$PUID":"$PGID" /data echo "... setting permissions, this might take a long time. If it takes too long at each boot, you could instead activate skip_permissions_check in the addon options"
chown -R "$PUID:$PGID" "$DATA_LOCATION"
chmod -R 777 "$DATA_LOCATION"
chown "$PUID:$PGID" /photos
chown -R "$PUID:$PGID" "$MACHINE_LEARNING_CACHE_FOLDER"
chown -R "$PUID:$PGID" "$REVERSE_GEOCODING_DUMP_DIRECTORY"
chown -R "$PUID:$PGID" /data
elif bashio::config.true "skip_permissions_check"; then
bashio::log.warning "... skipping permissions check as 'skip_permissions_check' is set"
fi
chmod 755 /data chmod 755 /data
#################### ####################

View File

@@ -1,3 +1,5 @@
## 1.138.0-1 (19-08-2025)
- New option : skip_permissions_check to skip permissions check
## 1.138.0 (16-08-2025) ## 1.138.0 (16-08-2025)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases) - Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -60,6 +60,7 @@ Webui can be found at `<your-ip>:8080`. PostgreSQL can be either internal or ext
| `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (not recommended for CUDA variant) | | `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (not recommended for CUDA variant) |
| `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (can be increased with CUDA) | | `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (can be increased with CUDA) |
| `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) | | `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) |
| `skip_permissions_check` | bool | `false` | Skip file permissions checking |
### Example Configuration ### Example Configuration

View File

@@ -137,7 +137,8 @@
"data_location": "str", "data_location": "str",
"library_location": "str?", "library_location": "str?",
"localdisks": "str?", "localdisks": "str?",
"networkdisks": "str?" "networkdisks": "str?",
"skip_permissions_check": "bool?"
}, },
"services": [ "services": [
"mysql:want" "mysql:want"

View File

@@ -1,3 +1,5 @@
## 1.138.0-1 (19-08-2025)
- New option : skip_permissions_check to skip permissions check
## 1.138.0 (16-08-2025) ## 1.138.0 (16-08-2025)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases) - Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -64,6 +64,7 @@ Webui can be found at `<your-ip>:8080`. PostgreSQL can be either internal or ext
| `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (recommended for NoML variant) | | `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (recommended for NoML variant) |
| `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (keep at 1 for NoML) | | `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (keep at 1 for NoML) |
| `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) | | `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) |
| `skip_permissions_check` | bool | `false` | Skip file permissions checking |
### Example Configuration ### Example Configuration

View File

@@ -138,7 +138,8 @@
"data_location": "str", "data_location": "str",
"library_location": "str?", "library_location": "str?",
"localdisks": "str?", "localdisks": "str?",
"networkdisks": "str?" "networkdisks": "str?",
"skip_permissions_check": "bool?"
}, },
"services": [ "services": [
"mysql:want" "mysql:want"

View File

@@ -1,3 +1,5 @@
## 1.138.0-1 (19-08-2025)
- New option : skip_permissions_check to skip permissions check
## 1.138.0 (16-08-2025) ## 1.138.0 (16-08-2025)
- Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases) - Update to latest version from imagegenius/docker-immich (changelog : https://github.com/imagegenius/docker-immich/releases)

View File

@@ -61,6 +61,7 @@ Webui can be found at `<your-ip>:8080`. PostgreSQL can be either internal or ext
| `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (not recommended for OpenVINO variant) | | `DISABLE_MACHINE_LEARNING` | bool | `false` | Disable ML features (not recommended for OpenVINO variant) |
| `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (can be increased with OpenVINO) | | `MACHINE_LEARNING_WORKERS` | int | `1` | Number of ML workers (can be increased with OpenVINO) |
| `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) | | `MACHINE_LEARNING_WORKER_TIMEOUT` | int | `120` | ML worker timeout (seconds) |
| `skip_permissions_check` | bool | `false` | Skip file permissions checking |
### Example Configuration ### Example Configuration

View File

@@ -137,7 +137,8 @@
"data_location": "str", "data_location": "str",
"library_location": "str?", "library_location": "str?",
"localdisks": "str?", "localdisks": "str?",
"networkdisks": "str?" "networkdisks": "str?",
"skip_permissions_check": "bool?"
}, },
"services": [ "services": [
"mysql:want" "mysql:want"