Skip to content

docs: add file permissions guidance to hardening page#14922

Open
skjnldsv wants to merge 1 commit into
masterfrom
fix/harden-server-file-permissions
Open

docs: add file permissions guidance to hardening page#14922
skjnldsv wants to merge 1 commit into
masterfrom
fix/harden-server-file-permissions

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented May 19, 2026

☑️ Resolves

Summary

The hardening page had no file permission guidance. The permissions section was removed in PR #431 because the web updater requires write access to the Nextcloud directory, but no replacement guidance was added and the tradeoff was never documented.

This adds a new "Set strong file permissions" subsection to the Deployment section covering:

  • Baseline chown/chmod commands to make the install directory read-only for the web server user
  • Note that data/ must remain writable by the web server user
  • Note that apps/ must remain writable if using the app store
  • Warning that the built-in web updater requires write access to the install dir, and that 'upgrade.disable-web' => true must be set before applying stricter permissions

Note: regarding the paths used, there is a discussion to unify those here: #11447

🖼️ Screenshots

image image

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes (n/a — text only)
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📖 Documentation Preview

🔍 Open preview →

📄 1 changed documentation page

Last updated: Wed, 20 May 2026 07:23:44 GMT

@skjnldsv skjnldsv self-assigned this May 20, 2026
@skjnldsv skjnldsv requested a review from icewind1991 May 20, 2026 04:38
@skjnldsv skjnldsv enabled auto-merge May 20, 2026 04:47
Comment thread admin_manual/installation/harden_server.rst Outdated
@skjnldsv skjnldsv force-pushed the fix/harden-server-file-permissions branch from 48828f5 to 18770ce Compare May 20, 2026 07:16
Adds a new 'Set strong file permissions' subsection to the Deployment
section of harden_server.rst.

The permissions section was removed in PR #431 because the web updater
needs write access to the install dir, but no replacement guidance was
added. This restores the guidance with the tradeoff clearly documented:
- baseline chmod/chown commands for read-only install dir
- note that data/ and apps/ must stay writable
- note that web updater must be disabled (upgrade.disable-web) before
  applying stricter install-dir permissions

Fixes #1353

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv requested a review from nickvergessen May 20, 2026 07:16
@skjnldsv skjnldsv force-pushed the fix/harden-server-file-permissions branch from 18770ce to d9b3ad9 Compare May 20, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardening and security guidance - add information about strong directory permissions

2 participants