A few things here:
The function has nothing to do with temp files
It probably shouldn't have an underscore in its name
It either needs to take a ```sudo=True/False``` arg or mention explicitly in the docstring that it uses sudo when calling chmod