windows RSA 密钥存储权限

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1024834/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:40:55  来源:igfitidea点击:

RSA Key Store Permissions

windowsfile-permissionsrsacryptoserviceprovider

提问by Crippledsmurf

Since yesterday I haven't been able to generate strong name keys using sn.exe or through Visual Studio which also uses sn.exe.

从昨天开始,我一直无法使用 sn.exe 或通过也使用 sn.exe 的 Visual Studio 生成强名称键。

When attempting to generate a key file the following cimmand is executed

尝试生成密钥文件时,将执行以下 cimmand

sn - k "key file.snk"

sn -k "密钥文件.snk"

sn.exe then responds with

sn.exe 然后响应

Failed to generate a strong name key pair -- Access is denied.

无法生成强名称密钥对 -- 访问被拒绝。

After repeating this process while running Process Monitor I now know that the locations to which sn.exe is denied access all reside within the following directory

在运行进程监视器时重复此过程后,我现在知道拒绝 sn.exe 访问的位置都位于以下目录中

\ProgramData\Microsoft\Crypto\RSA\MachineKeys

\ProgramData\Microsoft\Crypto\RSA\MachineKeys

Querying the permissions of this folder reveals that the Everyone and Administrators groups have no rights and the NETWORK SERVICE account has Full Control.

查询此文件夹的权限显示Everyone 和Administrators 组没有权限,NETWORK SERVICE 帐户具有完全控制权限。

Yesterday, I installed SourceGear Fortress which does use the NETWORK SERVICE account, however that is the only sicnificant change to the system prior to the issue occuring.

昨天,我安装了 SourceGear Fortress,它确实使用了 NETWORK SERVICE 帐户,但这是在问题发生之前对系统进行的唯一重大更改。

Is it normal for Everyone and Administrators to have no rights to the RSA key store?

所有人和管理员对 RSA 密钥库没有权限是否正常?

回答by Crippledsmurf

After restoring Read and Write permissions to my user account for the MachineKeys directory I was again able to generate keys

在为我的用户帐户恢复 MachineKeys 目录的读写权限后,我再次能够生成密钥