setaccesscontrol throws Attempted to perform unauthorized operation
Posted
by Darqer
on Stack Overflow
See other posts from Stack Overflow
or by Darqer
Published on 2010-04-28T11:02:39Z
Indexed on
2010/04/28
17:23 UTC
Read the original article
Hit count: 367
c#
I have ws2008 (i think that the same trouble can take place on windows vista), it is joined to the domain.
I run following code:
DirectorySecurity ds = Directory.GetAccessControl( "c:\\windows\\ADAM" );
ds.AddAccessRule( new FileSystemAccessRule( "domainName\\user",
FileSystemRights.Read | FileSystemRights.ListDirectory, AccessControlType.Allow ) );
Directory.SetAccessControl( configurationDirectory, ds );
I'm logged as domain administrator and I get following error: Attempted to perform unauthorized operation.
Some User should have access to *exe available in this directory. What can I do to achieve it?
© Stack Overflow or respective owner