fix: preserve user access to managed agent pipe after migration
This commit is contained in:
1 parent
1913984f80
commit
8ecfe880cc
2 files changed
+7
No files matched your search
@@ -37,6 +37,11 @@ try {
|
|||||||
$next | ConvertTo-Json -Depth 10 | Set-Content -LiteralPath $configPath -Encoding utf8NoBOM
|
$next | ConvertTo-Json -Depth 10 | Set-Content -LiteralPath $configPath -Encoding utf8NoBOM
|
||||||
& $ctl --config $configPath config validate --file $configPath
|
& $ctl --config $configPath config validate --file $configPath
|
||||||
if ($LASTEXITCODE) { throw 'Managed config validation failed' }
|
if ($LASTEXITCODE) { throw 'Managed config validation failed' }
|
||||||
|
# Elevated directory creation may set Administrators as owner. The pipe ACL
|
||||||
|
# follows this owner, so use the actual installing account rather than its group.
|
||||||
|
$directoryAcl = Get-Acl -LiteralPath $root
|
||||||
|
$directoryAcl.SetOwner([System.Security.Principal.WindowsIdentity]::GetCurrent().User)
|
||||||
|
Set-Acl -LiteralPath $root -AclObject $directoryAcl
|
||||||
& $ctl --config $configPath service install
|
& $ctl --config $configPath service install
|
||||||
if ($LASTEXITCODE) { throw 'Managed service installation failed' }
|
if ($LASTEXITCODE) { throw 'Managed service installation failed' }
|
||||||
$ready=$false
|
$ready=$false
|
||||||
|
|||||||
@@ -116,3 +116,5 @@ sudo ./adsctl --config /home/agent/.config/ads/agent.json service install --syst
|
|||||||
## 协议与限制
|
## 协议与限制
|
||||||
|
|
||||||
v3 增加 `/agents/register`(Agent WSS)、`/agents`(管理员 HTTP/WSS 列表)、`/rpc?agent=ID`(管理员 HTTP POST/WSS 请求)。均在 `/v3` 下,支持部署路径前缀。关联请求有超时与数量限制;服务端保留有限的离线主机快照,重启控制中心后重新注册。此版本不提供远程二进制升级、用户账号管理、任意命令执行或跨平台 USB 后端。
|
v3 增加 `/agents/register`(Agent WSS)、`/agents`(管理员 HTTP/WSS 列表)、`/rpc?agent=ID`(管理员 HTTP POST/WSS 请求)。均在 `/v3` 下,支持部署路径前缀。关联请求有超时与数量限制;服务端保留有限的离线主机快照,重启控制中心后重新注册。此版本不提供远程二进制升级、用户账号管理、任意命令执行或跨平台 USB 后端。
|
||||||
|
|
||||||
|
Windows 排障:本机管理返回拒绝访问时,检查配置目录所有者是否为实际使用管理客户端的用户。管理员权限创建目录可能将所有者设为 Administrators,普通 UAC 桌面进程不能使用这个组访问私有管道。保留原 ACL,将专属配置目录所有者调整为实际用户,再重启 Agent 重建管道。不要向 Everyone 授予管理权限。
|
||||||
Reference in new issue
Block a user