How can i add permissions for a specific group to read/write from an existent named pipe, using a powershell script?
This is as far as i went:
$AccessRule = New-Object System.IO.Pipes.PipeAccessRule( "Users", "FullControl", "Allow" )
$PipeSecurity = [System.IO.Directory]::GetAccessControl("\\.\pipe\docker_engine")
$PipeSecurity.AddAccessRule($AccessRule)
throw error
Cannot convert argument "rule", with value: "System.IO.Pipes.PipeAccessRule", for "AddAccessRule" to type "System.Security.AccessControl.FileSystemAccessRule"
while Ben's solution does work, the access-rules are lost whenever the Docker deamon is restarted.
But there's a permanent fix permanent fix in case of Docker:
Create the file
%programdata%\docker\config\daemon.json
with the following contents:This allows all users in the Windows group
Users
to open the named pipe without admin privileges.Best Jan
This is the documentation.
It says "unix socket" but works for the named pipe too.
The default group seems to be
docker
, but is not created by the deamon. And Docker Desktop creates a group calleddocker-users
.