本文介绍了从相同的用户信用户更改用户文件夹访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi
My requirement is to give write access to a particular folder for the user who have read access when running a specified application. I tried with google all the options gives only error like "Attempted to perform an unauthorized operation". I am working in c#
 colsole application. Please help on this issue





我的尝试:



我试过了



What I have tried:

I have tried with

DirectoryInfo dInfo = new DirectoryInfo(FileName);
           DirectorySecurity dSecurity = dInfo.GetAccessControl();
           dSecurity.AddAccessRule(new FileSystemAccessRule(Account,
           Rights,
           ControlType));
           dInfo.SetAccessControl(dSecurity);

推荐答案




这篇关于从相同的用户信用户更改用户文件夹访问权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 23:51