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.

o.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 complete replace the access rights on this resource. In other words all other users/groups are removed and only this user is assigned.

Remarks

This function requires administrative priviliges.

See also:

Library wwUtils

© West Wind Technologies, 2004-2017 • Updated: 09/30/09
Comment or report problem with topic