os.chmod will only work if you have permission to alter the file's attributes, which on unix depends on the file's owner/group compared to yours and on windows on the phase of the moon. And I wont even start down the rabbit hole of filesystem specific attributes, read the man page for chattr if you like.
|