def __init__(self, file, ignore_perms=False, **kwargs):
super(Config, self).__init__(**kwargs)<EOL>if not os.path.lexists(file):<EOL><INDENT>raise ConfigFileNotFoundError(file)<EOL><DEDENT>if not ignore_perms and ((not os.getuid() and not only_root_write(file)) or oth_w_perm(file)):<EOL><INDENT>file = os.path.abspath(file)<EOL>raise SecurityException(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>file=file, user=get_file_owner(file),<EOL>group=get_file_group(file), perms=os.stat(file).st_mode & <NUM_LIT>,<EOL>msg='<STR_LIT>' if os.getuid()<EOL>else '<STR_LIT>'))<EOL><DEDENT>self.file = file<EOL>self.read()<EOL>
Set the config file and validate file permissions

        :param str file: path to file
        :param kwargs: default values in dict