How to set permissions for write / read / write scripts (according to command line) on the IIS6.0 virtual directory ?
"post-text" itemprop = "text">
If you mean NTFS permissions, take a look at the following code:
/ * * D Modify permission on: \ MyWebSite and all children * / string path = "D: \ MyWebSite"; String user id = "bob"; FileSystemRights Right = FileSystemRights.Modify; Inheritance FlagsHorifelags = Inheritance Flags.Container Inherit | InheritanceFlags.ObjectInherit; DirectorySecurity acls = Directory.GetAccessControl (Path); FileSystemAccessRule acl = New FileSystemAccessRule (new NTAccount (userID), rights, succession, promotional flag, AccessControlType.Allow); Acls.AddAccessRule (ACL); Directory.SetAccessControl (Path, ACL);
For more information, see:
< P> You can also use it:
icacls.exe D: \ MyWebSite / grant bob: (ci) (oi) m
Comments
Post a Comment