简体   繁体   English

Process.Start 失败并拒绝访问

[英]Process.Start fails with access denied

I want to launch a child process from a .NET application (.NET 4.8) that has access only to a single specific directory on the disk.我想从 .NET 应用程序 (.NET 4.8) 启动一个子进程,该应用程序只能访问磁盘上的单个特定目录。 To achieve this, we first impersonate with a restricted access token where we remove all SIDs from the token except for a single group.为了实现这一点,我们首先使用受限访问令牌进行模拟,在该令牌中,我们从令牌中删除除单个组之外的所有 SID。 This group has read & write access to the specific directory on the disk and nothing else.该组对磁盘上的特定目录具有读写权限,没有其他权限。 Then we try to start the child process.然后我们尝试启动子进程。

Unfortunately, when trying to start the process it fails with a very generic "access denied" error.不幸的是,当尝试启动该过程时,它会失败并出现一个非常通用的“拒绝访问”错误。 My guess is, that I need some sort of special access rights to even start a process.我的猜测是,我需要某种特殊的访问权限才能启动一个进程。 What are the minimum requirements for that?对此的最低要求是什么? What else could be hindering me from starting the process?还有什么可能阻碍我开始这个过程?

Note: The process itself resides within this special directory, so that should not be the problem.注意:进程本身驻留在这个特殊目录中,所以这不应该是问题。

Our team just updated to Net5.0 and we're having similar issues trying to open a logging directory from Process.Start("path\to\log");我们的团队刚刚更新到 Net5.0,我们在尝试从Process.Start("path\to\log");打开日志目录时遇到了类似的问题。 If anyone has some insight, that would be awesome.如果有人有一些见解,那就太棒了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM