Recently I am using Python module os, when I tried to change the permission of a file, I did not get the expected result. For example, I intended to change the permission to
If you have desired permissions saved to string then do
s = '660' os.chmod(file_path, int(s, base=8))