os.chmod(path, mode)

where mode is the desired permission, in octal.