NT: Setting File Security Programmatically


I'm currently trying to workout how to set NT file security for some files
on our NT 4 network. The security settings cannot be set by the CACLS
program because we wish the permissions to be RWX (the nearest one is
change), thus I'm having to write a custom util to do so. I have looked
through the help files and found the following functions :

GetFileSecurity,SetFileSecurity, and the various Security Descriptor

but unfortunately there is very little information on how one would set
the Everyone group to have RWX permission and our normal admin groups to
have full control.

I program using BC45 and Delphi v2. Could someone please explain how one
would do this ? Or is there another security setting util that works from
the command line (or a batch file) that would enable the special file
access security settings to be set. We are using NTFS partitions for the
NT system.

Many thanks in advance,

Martin Searle
University of Kent  
Martin Searle (BSC(hons) Comp. Sci.,|   Member of Seasalter and Westbere
Systems Administrator (IMS)         |   Sailing Clubs
Computing Officer (jr) (Computing)  |   Owner of : Dart 15 (1331)