os.chmod()

os.chmod(path, mode)

Change the access permissions of a file.