开发者

Change / Check permissions (Read, Write,...) for the NETWORK SERVICE account with C#

开发者 https://www.devze.com 2022-12-23 19:26 出处:网络
How can I change / check the permissions (Read, Write,...) for a specific folder for the NETWORK SERVICE account with 开发者_如何学GoC# porgrammatically ?There\'s no generic \"find all permissions tha

How can I change / check the permissions (Read, Write,...) for a specific folder for the NETWORK SERVICE account with 开发者_如何学GoC# porgrammatically ?


There's no generic "find all permissions that this user has on all objects on this filesystem/system/domain function".

For objects where the ACLs are exposed to .Net framework, they typically expose a "GetAccessControl()" method, from which you can enumerate the AccessRules (via "GetAccessRules()"), and find those rules which apply to NETWORK SERVICE

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号