wwUtils::SetAcl

Sets the Access Control List on a file resource by running the CACLS utility.

Access can be set for both files and directories and can be set for inheritable rights. You can assign either individual users or groups, but only one at a time. If you need to assign multiple users/groups you have to call this function more than once.

SetAcl(lcPath,lcAccount,lcAccess,llInherit,llReplace)

Return Value

.T. or .F.

Parameters

lcPath
The directory or file where permissions are to be set.

lcAccount
The name of the user account to assign.

lcAccess
The type of access to set for this user or group.
N - None
R - Read
C - Change
F - Full

llInherit
If .T. causes child objects to inherit this setting. Applies to directories only.

llReplace
If .T. causes the ACL set to completely replace the access rights on this resource. In other words all other users/groups are removed and only this user is assigned. Unless you absolutely needs this leave this value set to .F.

Remarks

This is a standalone function, not a method. This function requires administrative priviliges to allow change ACL settings on files and folders.


See also:

Library wwUtils

© West Wind Technologies, 1996-2024 • Updated: 01/08/16
Comment or report problem with topic