I am trying to read the SACL properties of a folder.
The application will run on the Domain Controller, and it needs to read and update the SACL properties of a folder or file that is present in a member computer.
Is there any APIs available for this?
Can I use the GetNamedSecurityInfo
to read the file? if yes how should the path of the file be?
Consider the domain is 'Raja.org' and the folder for which I am trying to set the SACL is 'C:\Test'
what should be the path I pass to the GetNamedSecurityInfo
function?
You could use GetNamedSecurityInfo, where pObjectName
would be the path to the file and ObjectType is SE_FILE_OBJECT
.
SE_FILE_OBJECT
Indicates a file or directory. The name string that identifies a file or directory object can be in one of the following formats:
A relative path, such as FileName.dat or..\FileName
An absolute path, such as FileName.dat, C:\DirectoryName\FileName.dat, or G:\RemoteDirectoryName\FileName.dat.
A UNC name, such as \ComputerName\ShareName\FileName.dat.
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.