Skip to content

v11.4 log path restriction#8731

Merged
cwarnermm merged 4 commits intov11.4-documentationfrom
claude/issue-8730-20260206-2116
Feb 9, 2026
Merged

v11.4 log path restriction#8731
cwarnermm merged 4 commits intov11.4-documentationfrom
claude/issue-8730-20260206-2116

Conversation

@cwarnermm
Copy link
Member

Summary

Document the new MM_LOG_PATH environment variable and log path validation feature introduced in Mattermost v11.4.0. This security enhancement restricts log file locations to a designated root directory to prevent unauthorized filesystem access via logging configuration.

Changes

  • Environment Variables: Add MM_LOG_PATH documentation
  • Logging Configuration: Add comprehensive log path restrictions section
  • Support Packet Generation: Document audit logging
  • Configuration Settings: Update LogSettings documentation
  • Security Guide: Add security feature listing
  • Troubleshooting: Add log access troubleshooting section

Resolves #8730

Generated with Claude Code

cwarnermm and others added 2 commits February 6, 2026 11:56
* Update Playbooks v2.6 checklists documentation

- Add channel checklists as first-class workflows from v2.6.0
- Document rebrand from "Playbook Runs" to "Checklists"
- Update mobile v2.35.0 "Playbook checklists" terminology
- Document channel-based permissions vs playbook permissions
- Add API changes: Type field and optional playbook_id
- Include mobile API endpoints for checklist operations
- Mark PR evidence gaps for human validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>

* Editorial review cleanup

* Incorporated reviewer feedback

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
Document the new MM_LOG_PATH environment variable and log path
validation feature introduced in Mattermost v11.4.0. This security
enhancement restricts log file locations to a designated root
directory to prevent unauthorized filesystem access via logging
configuration.

Changes include:

Environment Variables:
- Add MM_LOG_PATH documentation with purpose, default, usage examples
- Document validation behavior and error handling

Logging Configuration:
- Add comprehensive "Log path restrictions" section
- Document path validation mechanism (absolute path resolution,
  symlink handling, directory boundary enforcement)
- Provide valid and invalid configuration examples
- Add troubleshooting guidance for log access errors
- Update file target configuration to note v11.4 path requirements

Support Packet Generation:
- Document audit logging for support packet generation (v11.4+)
- Note audit trail metadata for compliance tracking

Configuration Settings Reference:
- Update FileLocation setting with v11.4 validation note
- Update AdvancedLoggingJSON with path restriction requirements
- Add cross-references to detailed logging documentation

Security Guide:
- Add log path restrictions to security features list
- Highlight access control and configuration integrity benefits

Troubleshooting:
- Add "Log files not accessible" troubleshooting section
- Provide step-by-step resolution procedures
- Include decision flowchart for diagnosing log access issues
- Offer migration paths for existing custom log configurations

Addresses both System Admin and Risk Assessor personas with
practical configuration guidance, security context, and
comprehensive troubleshooting support.

Resolves #8730

Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
@cwarnermm cwarnermm requested a review from wiggin77 February 6, 2026 21:24
@cwarnermm cwarnermm added 1: Dev Review Requires review by a core commiter Guidance labels Feb 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Newest code from mattermost has been published to preview environment for Git SHA 3e46368

@cwarnermm cwarnermm changed the base branch from master to v11.4-documentation February 6, 2026 21:33
@cwarnermm cwarnermm added this to the v11.4.0 milestone Feb 6, 2026

The path you configure must exist, and Mattermost must have write permissions for this directory.
- The path you configure must exist, and Mattermost must have write permissions for this directory.
- From Mattermost v11.4, log file paths are validated to ensure they remain within the directory specified by the ``MM_LOG_PATH`` environment variable. If ``MM_LOG_PATH`` is not set, the default ``logs`` directory is used. Paths outside the allowed root directory are blocked. See the :doc:`Mattermost logging </administration-guide/manage/logging>` documentation for details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paths outside the allowed root directory are blocked

Currently paths outside the root cause an error in logs (to inform the admin they need to align with the policy) for writing logs. The blocking happens when trying to download logs for support packet. We may block writing logs outside the root in a future release.

- See the :doc:`Mattermost logging </administration-guide/manage/logging>` documentation for details. These targets have been chosen as they support the vast majority of log aggregators, and other log analysis tools, without needing additional software installed.
- Logs are recorded asynchronously to reduce latency to the caller.
- Advanced logging supports hot-reloading of logger configuration.
- From Mattermost v11.4, all file paths specified in ``AdvancedLoggingJSON`` configurations must be within the directory specified by the ``MM_LOG_PATH`` environment variable. See :ref:`log path restrictions <administration-guide/manage/logging:log path restrictions>` for details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must be within the directory

Here I think the wording is more restrictive than the actual policy. We inform the admin on log writing, and block downloads of logs.

@cwarnermm
Copy link
Member Author

@claude - Incorporate the technical feedback provided by @wiggin77 succinctly and concisely without over-communicating to admin and IT audiences.

@claude
Copy link
Contributor

claude bot commented Feb 9, 2026

Claude finished @cwarnermm's task in 2m 3s —— View job


Technical Feedback Incorporated

Completed Tasks:

  • Review feedback from @wiggin77
  • Read affected documentation sections
  • Update environment-configuration-settings.rst
  • Check related files for consistency
  • Commit and push changes

Summary

Updated wording across 3 documentation files to accurately reflect log path validation behavior:

Key corrections:

  • Changed "blocked" to "generate error logs and are excluded from support packet downloads" - paths outside root trigger warnings, blocking only happens for downloads
  • Changed "must be within" to "should be within" to reflect actual enforcement level

Files updated:

  • environment-configuration-settings.rst (2 locations)
  • logging.rst (3 locations)
  • troubleshooting.rst (1 location)

Changes maintain concise technical language for admin audiences per your request.


Branch: claude/issue-8730-20260206-2116

Update documentation to accurately reflect that log paths outside the
root directory generate error logs and are excluded from support packet
downloads, rather than being blocked from writing. Softened "must be"
language to "should be" to align with actual enforcement level.

Co-authored-by: Carrie Warner (Mattermost) <cwarnermm@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Newest code from mattermost has been published to preview environment for Git SHA 9ad3e79

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Newest code from mattermost has been published to preview environment for Git SHA 9ad3e79

@cwarnermm cwarnermm merged commit 6e24875 into v11.4-documentation Feb 9, 2026
4 checks passed
@cwarnermm cwarnermm deleted the claude/issue-8730-20260206-2116 branch February 9, 2026 21:12
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Newest code from mattermost has been published to preview environment for Git SHA 9215a57

@cwarnermm cwarnermm added 3: Reviews Complete All reviewers have approved the pull request and removed 1: Dev Review Requires review by a core commiter labels Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3: Reviews Complete All reviewers have approved the pull request Guidance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v11.4: Restrict Log Downloads to a Root Path for Support Packets

2 participants