code: def validate_file_ownership(config):
      
      files = config.get('files', {})
      for file_name, options in files.items():
          for key in options.keys():
              if key not in ["owner", "group", "mode"]:
                  raise RuntimeError(
                      "Invalid ownership configuration: {}".format(key))
          owner = options.get('owner', config.get('owner', 'root'))
          group = options.get('group', config.get('group', 'root'))
          optional = options.get('optional', config.get('optional', 'False'))
          if '*' in file_name:
              for file in glob.glob(file_name):
                  if file not in files.keys():
                      if os.path.isfile(file):
                          _validate_file_ownership(owner, group, file, optional)
          else:
              if os.path.isfile(file_name):
                  _validate_file_ownership(owner, group, file_name, optional)
docs: Verify that configuration files are owned by the correct user/group.