From 6f9f32dd490a70020f73f4b4f38633cfcbc8a875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:10:47 +0200 Subject: [PATCH] feat(config): add Windows Network Drive (WND) env vars to v24.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wire the windows_network_drive (WND) app config keys from config.apps.sample.php into the v24.04 image as OWNCLOUD_* environment variables, following the pattern established in 29a139f. These were intentionally skipped at the time. Exposes 13 of the 14 WND config keys via getConfigFromEnv() in config.php, with matching declarations in entrypoint.d/85-others.sh and documentation in ENVIRONMENT.md. The deeply nested wnd.kerberos.servers map is left out as it has no clean single-env-var representation. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- ENVIRONMENT.md | 26 ++++++++++ v24.04/overlay/etc/entrypoint.d/85-others.sh | 39 ++++++++++++++ v24.04/overlay/etc/templates/config.php | 53 ++++++++++++++++++++ 3 files changed, 118 insertions(+) diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md index 0fc108c..855e87d 100644 --- a/ENVIRONMENT.md +++ b/ENVIRONMENT.md @@ -434,6 +434,32 @@ Base URL for the ownCloud Web UI (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#override-cli-url)). - `OWNCLOUD_WEB_REWRITE_LINKS=` \ Redirect public/private links to the ownCloud Web UI (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_sample_php_parameters.html#override-cli-url)). +- `OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION=` \ + Register the Windows Network Drive app with the Activity app to report what `wnd:process-queue` is doing (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES=` \ + Send activity notifications to sharees of Windows Network Drive files and folders; requires `OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION` (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT=` \ + Timeout in milliseconds applied to all Windows Network Drive backend operations and connections (default `20000`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET=` \ + Comma-separated list of error codes that trigger a password reset for Windows Network Drive (default `13` = access denied); empty disables it (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE=` \ + How Windows Network Drive evaluates file attributes: `none`, `stat` (default) or `getxattr` (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST=` \ + Make the Windows Network Drive group membership component assume an ACL entry is a user and check users first (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE=` \ + Enable the in-memory notifier so Windows Network Drive storages reset passwords on detecting a wrong password (`true`/`false`, default `true`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL=` \ + Listen to events from the `smb_acl` app to update Windows Network Drive storages when an ACL changes (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME=` \ + Interval in seconds after which the Windows Network Drive listener reconnects to the database to avoid crashes from idle connections (default `28800`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_LOGGING_ENABLE=` \ + Enable additional debug logging for the Windows Network Drive app (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE=` \ + Maximum number of items in the Windows Network Drive permission manager per-request cache (default `512`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE=` \ + Probe both NFC/NFD UTF-8 forms in the Windows Network Drive collaborative cache wrapper, needed for macOS HFS+ mounts (`true`/`false`) (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). +- `OWNCLOUD_WND2_CACHE_WRAPPER_TTL=` \ + TTL in seconds for the Windows Network Drive collaborative cache wrapper (default `1800`); use a negative value to disable (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-windows-network-drive-wnd)). - `OWNCLOUD_WORKFLOW_RETENTION_ENGINE=` \ Retention engine for the workflow/tagging app: `tagbased` (default) or `userbased` (Enterprise only) (see [documentation](https://doc.owncloud.com/server/latest/admin_manual/configuration/server/config_apps_sample_php_parameters.html#app-workflow-tagging)). - `OWNCLOUD_WOPI_BUSINESS_FLOW_ENABLED=` \ diff --git a/v24.04/overlay/etc/entrypoint.d/85-others.sh b/v24.04/overlay/etc/entrypoint.d/85-others.sh index 1ea2097..a6a9696 100755 --- a/v24.04/overlay/etc/entrypoint.d/85-others.sh +++ b/v24.04/overlay/etc/entrypoint.d/85-others.sh @@ -354,4 +354,43 @@ declare -x OWNCLOUD_WOPI_PROXY_URL declare -x OWNCLOUD_WOPI_BUSINESS_FLOW_ENABLED [[ -z "${OWNCLOUD_WOPI_BUSINESS_FLOW_ENABLED}" ]] && OWNCLOUD_WOPI_BUSINESS_FLOW_ENABLED="" +declare -x OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION +[[ -z "${OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION}" ]] && OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION="" + +declare -x OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES +[[ -z "${OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES}" ]] && OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES="" + +declare -x OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT +[[ -z "${OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT}" ]] && OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT="" + +declare -x OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET +[[ -z "${OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET}" ]] && OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET="" + +declare -x OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE +[[ -z "${OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE}" ]] && OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE="" + +declare -x OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST +[[ -z "${OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST}" ]] && OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST="" + +declare -x OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE +[[ -z "${OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE}" ]] && OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE="" + +declare -x OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL +[[ -z "${OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL}" ]] && OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL="" + +declare -x OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME +[[ -z "${OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME}" ]] && OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME="" + +declare -x OWNCLOUD_WND_LOGGING_ENABLE +[[ -z "${OWNCLOUD_WND_LOGGING_ENABLE}" ]] && OWNCLOUD_WND_LOGGING_ENABLE="" + +declare -x OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE +[[ -z "${OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE}" ]] && OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE="" + +declare -x OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE +[[ -z "${OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE}" ]] && OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE="" + +declare -x OWNCLOUD_WND2_CACHE_WRAPPER_TTL +[[ -z "${OWNCLOUD_WND2_CACHE_WRAPPER_TTL}" ]] && OWNCLOUD_WND2_CACHE_WRAPPER_TTL="" + true diff --git a/v24.04/overlay/etc/templates/config.php b/v24.04/overlay/etc/templates/config.php index 927f976..2aae163 100644 --- a/v24.04/overlay/etc/templates/config.php +++ b/v24.04/overlay/etc/templates/config.php @@ -668,6 +668,59 @@ function getConfigFromEnv() { $config['wopi.business-flow.enabled'] = getenv('OWNCLOUD_WOPI_BUSINESS_FLOW_ENABLED'); } + // app: windows_network_drive (wnd) (enterprise) + if (getenv('OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION') != '') { + $config['wnd.activity.registerExtension'] = getenv('OWNCLOUD_WND_ACTIVITY_REGISTER_EXTENSION') === 'true'; + } + + if (getenv('OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES') != '') { + $config['wnd.activity.sendToSharees'] = getenv('OWNCLOUD_WND_ACTIVITY_SEND_TO_SHAREES') === 'true'; + } + + if (getenv('OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT') != '') { + $config['wnd.connector.opts.timeout'] = (int) getenv('OWNCLOUD_WND_CONNECTOR_OPTS_TIMEOUT'); + } + + if (getenv('OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET') != '') { + $config['wnd.errorCodes.passwordReset'] = array_map('intval', explode(',', getenv('OWNCLOUD_WND_ERROR_CODES_PASSWORD_RESET'))); + } + + if (getenv('OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE') != '') { + $config['wnd.fileInfo.parseAttrs.mode'] = getenv('OWNCLOUD_WND_FILE_INFO_PARSE_ATTRS_MODE'); + } + + if (getenv('OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST') != '') { + $config['wnd.groupmembership.checkUserFirst'] = getenv('OWNCLOUD_WND_GROUP_MEMBERSHIP_CHECK_USER_FIRST') === 'true'; + } + + if (getenv('OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE') != '') { + $config['wnd.in_memory_notifier.enable'] = getenv('OWNCLOUD_WND_IN_MEMORY_NOTIFIER_ENABLE') === 'true'; + } + + if (getenv('OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL') != '') { + $config['wnd.listen_events.smb_acl'] = getenv('OWNCLOUD_WND_LISTEN_EVENTS_SMB_ACL') === 'true'; + } + + if (getenv('OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME') != '') { + $config['wnd.listen.reconnectAfterTime'] = (int) getenv('OWNCLOUD_WND_LISTEN_RECONNECT_AFTER_TIME'); + } + + if (getenv('OWNCLOUD_WND_LOGGING_ENABLE') != '') { + $config['wnd.logging.enable'] = getenv('OWNCLOUD_WND_LOGGING_ENABLE') === 'true'; + } + + if (getenv('OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE') != '') { + $config['wnd.permissionmanager.cache.size'] = (int) getenv('OWNCLOUD_WND_PERMISSION_MANAGER_CACHE_SIZE'); + } + + if (getenv('OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE') != '') { + $config['wnd2.cachewrapper.normalize'] = getenv('OWNCLOUD_WND2_CACHE_WRAPPER_NORMALIZE') === 'true'; + } + + if (getenv('OWNCLOUD_WND2_CACHE_WRAPPER_TTL') != '') { + $config['wnd2.cachewrapper.ttl'] = (int) getenv('OWNCLOUD_WND2_CACHE_WRAPPER_TTL'); + } + switch (true) { case getenv('OWNCLOUD_REDIS_ENABLED') && getenv('OWNCLOUD_REDIS_ENABLED') === 'true': $config = array_merge_recursive($config, [