问题描述
我正在尝试为 PostgreSQL 创建证书.
I'm trying to create a certificate to PostgreSQL.
在此链接上的最后一步是使用命令:
On this link the last step is use the command:
chmod og-rwx server.key
但我有 Windows 10.那个命令的等价物是什么?
But I have Windows 10. What could be the equivalent of that command?
推荐答案
这可能有效,icacls server.key/grant Everyone:F
说明:因此,chmod 所做的是更改文件权限.root 或任何具有 chmod 能力的人都可以允许或删除权限,例如r读取文件、w读取文件或 ex 正在执行文件.所以声明,chmod og-rwx server.key 意味着 o 允许不是这个文件所有者的用户,以及 g,用户此文件组的一部分到 rwx(或读取、写入和执行).现在,告诉 chmod 我们要对哪个文件执行此操作?server.key.
Explanation: So, what chmod does is change a file(s) permissions. The root, or whoever has the ability to chmod, can allow or remove permissions such as reading a file, writing to a file, or executing a file.So the statement, chmod og-rwx server.key means o allow users who are not owners of this file, AND g, users who are part of this files' group to rwx (or read, write, and execute). Now, tell chmod what file we are doing this to? server.key.
问题变成了,我们如何在 Windows 10 中复制此命令和选项?根据 microsoft 的 technet 页面: icacls
是要使用的命令.接下来,镜像 chmod.. 描述的选项,以便我们授予每个人完全访问权限.
The question then becomes, how do we replicate this command and options in windows 10? according to microsoft's technet page: icacls
is the command to use. Next, mirror the options described by chmod..so we grant everyone full access.
希望这会有所帮助(更重要的是有效!)
Hope this helps (and more importantly works!)
这篇关于Windows 中的 chmod og-rwx server.key的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!