Skip to content

Permission denied on specific operations when using symlink to network share #1561

@sawo1337

Description

@sawo1337

"OpenSSH for Windows 8.1.0.0"

Windows Server 2016 Datacenter

Client OperatingSystem
Any

What is failing
When using a symlink to a network share as ChrootDirectory, I can rename files, delete files, create empty files, but as soon as I attempt to append any data to the file I just created, I get permission denied. An empty file is created on the server, but no data is in it.
I'm using domain users, they have full permissions over the network share, NTFS permissions on the network server, I can log in using the same user and create files just fine, but as soon I attempt the same using SFTP client, it fails with permission denied error.
On the target server, I can see the correct user is attempting the operation, but for some reason, it fails. No failure is logged on the network share server, tried different network share server where everyone has full control, but still no go.
It is interesting that during testing this worked for a brief moment, but then it never worked afterward.
This is all with password authentication.

Config:

AllowGroups domain\sftpgroup
AuthenticationMethods password
ForceCommand internal-sftp
ChrootDirectory C:\root\sftpnetworksharesymlink
AllowTcpForwarding no
PermitTunnel no
GatewayPorts no

Expected output
Files are uploaded by the logged-in user.

Actual output
An empty file is created and then permission denied message is shown on the client.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions