when you right-click on a file or directory in Windows XP and select 'properties' you get the usual windows properties pop-up. In this pop-up there are two places where you can set file permissions, the first, is in the 'Security' tab, which has checkboxes for 'Full Control', 'Modify', 'Read & Execute' etc. and the second can be found by clicking the 'Advvanced' button at the bottom of the 'Security' tab.
I know how to set the file/directory permissions for the 'Advanced' section programmatically in C# (using .GetAccessControl, .AddAccessRule and .SetAccessControl), but I cannot find a way of programmatically setting the file permissions in the normal 'Security' section of the file properties window.
Can anyone tell me how to do this programmatically in C#?
These are just different views of the same underlying data - you will need to use the methods you mention to update file permissions.
Information available here: http://msdn.microsoft.com/en-us/library/system.io.file.setaccesscontrol.aspx
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.