Hi Yamini,
haven't tried that, but I'd guess you could do sth. like this:
yourPageRefFolder.getDefinedPrincipalPermissions().forEach(principal -> {
yourPageFolder.setPermission(principal, yourPageRefFolder.getPermission(principal));
});
As a trigger you could use a PermissionListener - in that case you wouldn't even need to set all permission, since it provides the changed permission.
Best regards
Felix