# Separate an OpenSSH SFTP jail root from its upload directory

> Check ownership of the whole chroot path before changing upload permissions for an SFTP account.

- Canonical URL: https://update.dsesecurity.com/updates/openssh-sftp-chroot-upload-ownership/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-15T00:43:32+00:00
- Modified: 2026-10-15T00:44:33+00:00
- Last reviewed by DSE: 2026-10-14
- Resource type: Guide
- DSE priority: Information
- Topics: Cybersecurity, IT
- Reading time: 2 minutes

## What you need to know

Check ownership of the whole chroot path before changing upload permissions for an SFTP account.

## Potentially affected

This guide follows the OpenBSD/OpenSSH manual’s Unix permission model. Confirm the installed platform and effective sshd configuration before translating it to a different operating system.

## DSE recommendation

DSE recommends keeping the jail root under administrative ownership and providing an explicitly authorized writable child directory for uploads.

## Article

Check ownership of the whole chroot path before changing upload permissions for an SFTP account.

## Source facts

The OpenSSH manual requires all components of ChrootDirectory to be owned by root and not writable by other users or groups. These checks apply regardless of StrictModes. The in-process internal-sftp server avoids a separate support-file environment for SFTP. ForceCommand internal-sftp alone does not disable forwarding; the manual identifies DisableForwarding or individual forwarding controls as separate settings.

Source: [OpenBSD — sshd_config manual](https://man.openbsd.org/sshd_config).

## Applicability

This guide follows the OpenBSD/OpenSSH manual’s Unix permission model. Confirm the installed platform and effective sshd configuration before translating it to a different operating system.

## DSE recommendation

DSE recommends keeping the jail root under administrative ownership and providing an explicitly authorized writable child directory for uploads. Review every parent component rather than checking only the final folder. Match the account to its intended SFTP-only policy and review forwarding independently. Keep an administrative recovery session available during an approved configuration change. Record the expected landing path and permitted file operations so a working login does not conceal excessive write access.

## Verification

Validate the effective account-specific configuration, then test login, upload, rename, and download as required. Confirm that writing to the jail root and accessing outside the intended area fail. Test the agreed forwarding restrictions in a controlled environment and retain sanitized results without account passwords.

## Official reference

[OpenBSD — sshd_config manual](https://man.openbsd.org/sshd_config). Reviewed October 14, 2026.

## Primary reference

- Name: OpenBSD — sshd_config manual
- Authority: man.openbsd.org
- URL: https://man.openbsd.org/sshd_config
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Separate an OpenSSH SFTP jail root from its upload directory,” DSE Security, https://update.dsesecurity.com/updates/openssh-sftp-chroot-upload-ownership/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
