in reply to Re: File permission
in thread File permission

Some editors create a new file rather than overwriting an existing file. Once the new file is written, the old file is replaced with the new file. This prevents information loss in the event of an error.

This could account for a change in permission. You can verify if this is happening by comparing the inode number of the file before and after the permission change.