Set security rights to access a file or folder

The function sets full file / folder permissions for the specified user or group.


path - path to file or folder

userName - username or group name

In order not to specify the group name explicitly, since it depends on the system language, you can use the function: Find out the name of a user or group by SID.


True - on success, False - on failure

Author: admin