Skip to content

feat(skeleton): use skeleton folder from mounted volume in v24.04#477

Open
DeepDiver1975 wants to merge 1 commit into
masterfrom
feat/skeleton-volume-folder
Open

feat(skeleton): use skeleton folder from mounted volume in v24.04#477
DeepDiver1975 wants to merge 1 commit into
masterfrom
feat/skeleton-volume-folder

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Summary

Replaces the OWNCLOUD_SKELETON_DIRECTORY env var with a fixed folder inside the mounted data volume at ${OWNCLOUD_VOLUME_ROOT}/skeleton (e.g. /mnt/data/skeleton), for v24.04 only.

Behavior:

  • When the volume skeleton folder holds content → it is used as the skeleton directory.
  • When it is empty (or absent)skeletondirectory is left unset so owncloud/core falls back to its built-in core/skeleton default.

The emptiness check runs at request time in config.php via FilesystemIterator, so adding/removing skeleton content takes effect without regenerating config.

Changes (v24.04 only)

  • overlay/etc/templates/config.php — replace the env-var-driven skeleton block with a runtime check of ${OWNCLOUD_VOLUME_ROOT}/skeleton.
  • overlay/etc/entrypoint.d/85-others.sh — remove the OWNCLOUD_SKELETON_DIRECTORY declaration.
  • overlay/etc/owncloud.d/10-folders.sh — create ${OWNCLOUD_VOLUME_ROOT}/skeleton alongside the other volume folders (covered by the existing recursive chown of the volume root).

Feasibility

Verified against owncloud/core: copySkeleton() calls getSystemValue('skeletondirectory', \OC::\$SERVERROOT . '/core/skeleton'). Omitting the key yields the core default (the desired fallback); an empty string would instead disable skeleton copying — which is why the key is omitted, not set to "", when the folder is empty.

Compatibility

⚠️ Breaking change in v24.04 for anyone relying on OWNCLOUD_SKELETON_DIRECTORY. v20.04 and v22.04 retain the env-var behavior unchanged, so ENVIRONMENT.md remains accurate and is untouched.

Verification

  • php -l v24.04/overlay/etc/templates/config.php → no syntax errors.
  • grep -rn "SKELETON_DIRECTORY" v24.04/ → no matches.

🤖 Generated with Claude Code

Replace the OWNCLOUD_SKELETON_DIRECTORY env var with a fixed folder
inside the mounted data volume at ${OWNCLOUD_VOLUME_ROOT}/skeleton.

When that folder holds content it is used as the skeleton directory;
when it is empty the 'skeletondirectory' key is left unset so
owncloud/core falls back to its built-in core/skeleton default. The
emptiness check runs at request time in config.php via
FilesystemIterator, so adding/removing skeleton content takes effect
without regenerating config.

The folder is created alongside the other volume folders and is
covered by the existing recursive chown of the volume root.

This is a breaking change in v24.04 for anyone relying on
OWNCLOUD_SKELETON_DIRECTORY. v20.04 and v22.04 are intentionally left
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975 DeepDiver1975 force-pushed the feat/skeleton-volume-folder branch from 6d9d56a to 82b808a Compare June 11, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant