Skip to content
File transfer10 min read14.08.2026

How to Fix SFTP Permission Denied and Upload Errors

If SFTP login succeeds but a file cannot be uploaded, the connection is usually working. The target directory ownership, write permission, quota or SFTP policy is refusing the operation.

SFTPPermission deniedChrootFile permissions
SFTP connection profile in Varkuna Connect

Separate login errors from file-operation errors

If the password or key is rejected, the user has not authenticated. If directory listing works but upload, delete or rename is denied, authentication succeeded and the file system or SFTP policy blocked that operation.

Record the exact operation and remote path. If the same account can write to another directory, the problem is probably specific to the destination rather than the whole account.

Common causes of SFTP permission denied

No directory write permission

The user or group cannot create a new entry in the target directory.

Incorrect ownership

A file or directory belongs to another account; checking only the numeric mode is not enough.

Chroot layout

The SFTP jail root may intentionally be non-writable and require a separate writable child directory.

Read-only storage or quota

The file system may be read-only, the disk full or the user quota exhausted.

Restricted operation

An SFTP-only policy may block delete, rename or selected file-name patterns.

Client-side checks

  1. 1
    Verify the remote path

    A displayed path can differ from the real server path inside a chroot; confirm the current remote directory.

  2. 2
    Try a simple test file

    A small file with a safe name separates permission problems from size and naming rules.

  3. 3
    Test an allowed directory

    Compare with a known upload or home subdirectory assigned to the account.

  4. 4
    Inspect the connection log

    Identify the failed SFTP request and the status message returned by the server.

Check ownership and permissions on Linux

Creating a file requires appropriate access on the parent directory, not just the file itself. Check the user’s effective groups and every directory component along the path.

Applying 777 can hide the actual ownership problem and let unrelated users change data. Set the intended owner and group, then grant only the permissions required by the workflow.

Inspect identity and path permissions
id user
ls -ld /srv/sftp /srv/sftp/upload
namei -l /srv/sftp/upload

Why might ChrootDirectory be non-writable?

OpenSSH applies strict ownership and writability rules to a chroot jail root. A common safe layout uses a root-owned chroot directory with a separate upload directory beneath it that the SFTP user can write to.

Making the jail root writable by the user can cause login to fail entirely. Create a writable child directory instead of weakening the chroot root and grant access only to the intended account.

777 is not a permanent fix

Broad permissions damage account isolation and data integrity. Use the narrowest ownership, group and mode that support the required operation.

Server-side checklist

Disk and quota

Check free space, inode usage and the quota assigned to the user.

Read-only state

Determine whether storage was remounted read-only after a file-system error.

SFTP configuration

Review Subsystem, Match, ForceCommand and ChrootDirectory rules.

Additional controls

Inspect SELinux, AppArmor or Windows ACL restrictions when applicable.

Server logs

Use logs to determine whether the denial came from the file system, policy or SFTP subsystem.

Continue

Put the guide into practice.

Review the related Varkuna product or open its detailed user guide.