PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.44k stars 762 forks source link

User permission error #2256

Closed zxc9527 closed 3 months ago

zxc9527 commented 3 months ago

Prerequisites

Steps to reproduce

I added a non-administrator user, test, and gave it read-only access to the sftp root directory, but it could still read and write from the root directory

Folder Permission: QQMail_1721635259416

Config: QQMail_1721635261998

Sftp client: QQMail_1721635264905

Expected behavior

The specified user has only read permission on the specified path

Actual behavior

The specified user can read and write the read-only path

Error details

No response

Environment data

PS C:\Program Files\OpenSSH> $PSVersionTable

 

Name                           Value

----                           -----

PSVersion                      5.1.17763.5458

PSEdition                      Desktop

PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

BuildVersion                   ‪10.0.17763.5458‬

CLRVersion                     ‪4.0.30319.42000‬

WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

SerializationVersion           1.1.0.1

Version

OpenSSH v9.5.0.0p1

Visuals

No response

NoMoreFood commented 3 months ago

What are the permissions for 'Users'? The permissions are going to be the cumulative permissions of those assigned to 'test' + 'Users'.

zxc9527 commented 3 months ago

What are the permissions for 'Users'? The permissions are going to be the cumulative permissions of those assigned to 'test' + 'Users'.

Same permissions as test

tgauth commented 3 months ago

Can you verify that the test user only has read permissions to the folder outside of an SSH connection?

NoMoreFood commented 3 months ago

@zxc9527 You will have to remove 'Users' from any files under that directory.

zxc9527 commented 3 months ago

Can you verify that the test user only has read permissions to the folder outside of an SSH connection?

I have tested that other folders in D:\ path can also read and write

D:\ permission: QQMail_1721697002286

zxc9527 commented 3 months ago

@zxc9527 You will have to remove 'Users' from any files under that directory.

It worked, thank you very much for your help