Skip to content

docs(admin_manual): document user home containment and user.home_base_dirs - #1573

Merged
DeepDiver1975 merged 2 commits into
masterfrom
docs/oc10-133-user-home-containment
Jul 28, 2026
Merged

docs(admin_manual): document user home containment and user.home_base_dirs#1573
DeepDiver1975 merged 2 commits into
masterfrom
docs/oc10-133-user-home-containment

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

A user backend can supply a per user home directory — with LDAP, the User Home
Folder Naming Rule
setting can name it from a per user attribute (attr:cn,
attr:homeDirectory). That value was accepted essentially verbatim, so a home
pointing at the ownCloud code directory gave the user read and write access to
the application's own PHP files. It is now confined to the data directory:

This documents the new behaviour and the config option that opts out of it.

Changes

configuration/user/user_auth_ldap.adoc — a CAUTION: in the User Home
Folder Naming Rule
item: what is refused, what an affected user sees (login
fails, an error naming the path and the option is logged), how symlinks are
treated (a symlinked data directory keeps working; a symlink inside it cannot be
used to escape), and how to permit additional base directories. It also states
the upgrade case explicitly — an installation whose homes legitimately live
outside the data directory must set the option before upgrading, or those
users cannot log in afterwards.

configuration/server/config_sample_php_parameters.adoc — regenerated,
adding the user.home_base_dirs section.

How this was produced and verified

The parameters page is generated by
owncloud/config-to-docs from
core's config/config.sample.php, so it was regenerated rather than hand-edited:

php convert.php config:convert-adoc \
  --input-file=../core/config/config.sample.php \
  --output-file=../docs-server/modules/admin_manual/pages/configuration/server/config_sample_php_parameters.adoc
  • Regeneration is clean: running the generator against the pre-change
    config.sample.php reproduces the currently published page byte for byte
    (diff empty), so the diff here contains nothing but the new option — no
    generator churn.
  • Rendering checked with Asciidoctor: the CAUTION: becomes an admonition
    block inside the definition-list item, and the PHP snippet renders.
  • The xref: resolves: the target section's generated anchor is
    additional-base-directories-a-user-home-may-be-located-in, confirmed against
    the repo's idprefix: '' / idseparator: '-' attributes — matching the xref
    used here.
  • One wording fix went into core alongside this (owncloud/core@540592f), because
    the sample comment wrapped so that a line started with - , which AsciiDoc
    would have rendered as a stray list item on the generated page.

Related: OC10-133 (internal).

🤖 Generated with Claude Code

…_dirs

A user backend can supply a per user home directory - the LDAP backend for
instance can be configured to read it from a user attribute via the "User Home
Folder Naming Rule" setting. That value is now confined to the data directory,
because an LDAP directory is not necessarily administered by the people who
administer the ownCloud server (owncloud/core#41752, owncloud/user_ldap#849).

Add a CAUTION to the "User Home Folder Naming Rule" item explaining the
containment, what an affected user sees, how symlinks are treated, and how to
permit additional base directories with "user_ldap.home_base_dirs" or
"user.home_base_dirs". Existing installations whose homes legitimately live
outside of the data directory need the setting before upgrading, so that is
called out explicitly.

Regenerate the config parameters page with owncloud/config-to-docs from the
core branch's config.sample.php, which adds the "user.home_base_dirs" section.
Verified the generator reproduces the current page byte for byte from the
pre-change config.sample.php, so the diff is limited to the new option.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Regenerated from core's config.sample.php after owncloud/core#41752 spelled out
that a non-absolute entry in user.home_base_dirs is ignored - a relative one
would otherwise resolve against the working directory of whichever process
happens to run the containment check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 merged commit 95f8cd3 into master Jul 28, 2026
2 checks passed
@DeepDiver1975
DeepDiver1975 deleted the docs/oc10-133-user-home-containment branch July 28, 2026 15:44
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.

2 participants