anchor.diff:          )
       catch T:R ->
           FilePathsToRequiredPerms = maps:fold(fun(Guid, RequiredPerms, Acc) ->
  -            lfm_proxy:set_perms(Node, ?ROOT_SESS_ID, {guid, Guid}, 8#777),
  -            case lfm_proxy:get_file_path(Node, OwnerSessId, Guid) of
  -                {ok, Path} -> Acc#{Path => RequiredPerms};
  -                _ -> Acc#{Guid => RequiredPerms}
  -            end
  +            Acc#{get_file_path(Node, OwnerSessId, Guid) => RequiredPerms}
           end, #{}, PosixPermsPerFile),
   
           ct:pal(
  
positive.code: -include_lib("ctool/include/test/performance.hrl").
  
  -export([run_scenarios/2]).
  
  -define(SCENARIO_NAME(__PREFIX, __TYPE),
      <<__PREFIX, (atom_to_binary(__TYPE, utf8))/binary>>
  
negative.code:                 children = Files
              }
          ),
  
          {ComplementaryPermsPerFile, AllRequiredPerms} = get_complementary_perms(
              Node, PermsPerFile
          ),
          run_acl_perms_scenario(
              Node, OwnerSessId, SessId, ScenarioRootDirPath, ScenarioName,
              Operation, ComplementaryPermsPerFile, AllRequiredPerms,
              ExtraData, AceWho, AceFlags, ScenarioType
          )
      end, [
          {OwnerSessId, allow, <<"acl_owner_allow">>, ?owner, ?no_flags_mask},
          {UserSessId, allow, <<"acl_user_allow">>, SpaceUser, ?no_flags_mask},
          {UserSessId, allow, <<"acl_user_group_allow">>, SpaceUserGroup, ?identifier_group_mask},
          {UserSessId, allow, <<"acl_everyone_allow">>, ?everyone, ?no_flags_mask},
  
          {OwnerSessId, deny, <<"acl_owner_deny">>, ?owner, ?no_flags_mask},
          {UserSessId, deny, <<"acl_user_deny">>, SpaceUser, ?no_flags_mask},
          {UserSessId, deny, <<"acl_user_group_deny">>, SpaceUserGroup, ?identifier_group_mask},
          {UserSessId, deny, <<"acl_everyone_deny">>, ?everyone, ?no_flags_mask}
      ]).
  
  
  run_acl_perms_scenario(
      Node, OwnerSessId, SessId, ScenarioRootDirPath, ScenarioName, Operation,
      ComplementaryPermsPerFile, AllRequiredPerms, ExtraData, AceWho, AceFlags, allow
  ) ->
      [AllRequiredPermsComb | EaccesPermsCombs] = combinations(AllRequiredPerms),
  
      % Granting all perms without required ones should result in {error, ?EACCES}
      lists:foreach(fun(EaccesPermComb) ->
          EaccesPermsPerFile = lists:foldl(fun({Guid, Perm}, Acc) ->
              Acc#{Guid => [Perm | maps:get(Guid, Acc)]}
          end, ComplementaryPermsPerFile, EaccesPermComb),
  
          lfm_permissions_test_utils:set_acls(
              Node, EaccesPermsPerFile, #{}, AceWho, AceFlags
          ),
          ?assert_match(
              {error, ?EACCES},
              Operation(OwnerSessId, SessId, ScenarioRootDirPath, ExtraData),
              ScenarioName,
              EaccesPermsPerFile
          )
      end, EaccesPermsCombs),
  
  