def METHOD_NAME(
        data_dir: Path,
        function_scope_messages_aggregator: MessagesAggregator,
        sql_vm_instructions_cb: int,
):
    not_allowed_dir = os.path.join(data_dir, 'notallowed')
    allowed_user_dir = os.path.join(data_dir, 'allowed_user')
    os.mkdir(not_allowed_dir)
    os.chmod(not_allowed_dir, 0o200)
    os.mkdir(allowed_user_dir)
    Path(Path(allowed_user_dir) / 'rotkehlchen.db').touch()
    handler = DataHandler(
        data_directory=data_dir,
        msg_aggregator=function_scope_messages_aggregator,
        sql_vm_instructions_cb=sql_vm_instructions_cb,
    )
    assert handler.get_users() == {'allowed_user': 'loggedout'}
    # Change permissions back to that pytest cleanup can clean it
    os.chmod(not_allowed_dir, 0o777)