note
waswas-fng
backup_file has different perms because you copied the file to a new file as a different user. I am not saying backup_file is gone if you hit that case -- only that you end up in a situation where your app or the other apps that use that file are looking at corrupt data (they don't know about backup_file).
cat backup_file > file does the following:
<code>
trunc file.
# this is where you have the race condition.
redirects the data in backup_file to file.
closes file
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-185225">
<br><br>-Waswas
</div></div>
471413
471507