• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

Set NTFS permissions

I need to create a little program that would run in a DOS window and that would enable me to change a file's or a folder's NTFS permissions.
I can't find the right fonction to do so.
Could anyone help me?
(I program in BC5)

Thanks
0
jltari
Asked:
jltari
  • 2
1 Solution
 
Black_EndCommented:
The Sceurity Interface on Win32 is not easy to use, anyways start with SetNamedSecurityInfo
0
 
jkrCommented:
'SetFileSecurity()' is your API of choice - see http://msdn.microsoft.com/library/psdk/winbase/acctrlow_6yk3.htm ('Allowing Access Using the Low-Level Functions') and http://msdn.microsoft.com/library/psdk/winbase/acctrlow_9377.htm ('Denying Access Using Low-Level Functions')
0
 
jkrCommented:
OK, here we go: THE complete and thorough sample about using the NT security APIs with C++ is the source code of 'CaCLs' at http://msdn.microsoft.com/library/devprods/vs6/visualc/vcsample/vcsmpcacls.htm
0
 
jltariAuthor Commented:
Thanks a lot
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now