<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chmod(config):
 """Set correct file permissions."""

    output_dir = config["output_dir"]
    for dirpath, dirnames, filenames in os.walk(output_dir):
        for dirname in dirnames:
            os.chmod(os.path.join(dirpath, dirname), 0755)
        for filename in filenames:
            os.chmod(os.path.join(dirpath, filename), 0644)