简体   繁体   中英

Error in set access rights to folder in network programming

In my program first admin user must choose a folder that it should be in a shared folder and then my program should change its access rule to 'Deny' and every time that admin wants,the access rule of this folder should change to 'Allow' and then change to 'Deny' again.I do this with 'DirectorySecurity' class and its work correctly.but the problem occurres when another user wants to change the rule of this folder.at this times i recieve an error that tells me this user can not do this action. please help me.

Hi
It's possible that user(which got error) not be Member of Administrator Group for that computer. as default administrators group is owner all file and directory. Also you must check Owner and Auditing for that File Directory.
only user can access to special setting (like security) was define in owner security.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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