Sets the permissions on the folder, replacing all visible permissions already set on the folder with those provided in the permissions argument.
The visible permissions are the ones the user can see, so this operation may not affect all permissions on the object. Users that manage subfolders in Public Queries are able to manipulate permissions for the groups they are a member of, but not able to manipulate (nor discover) permissions for any other groups (that may have been applied by the security administrator).