in reply to Re^2: Writing to a file atomically without renaming
in thread Writing to a file atomically without renaming

how about using a symbolic link?

For instance, suppose you have foo-1 and foo.link pointing to foo-1. To update it, first create foo-2, then change its permissions and finally point foo.link to foo-2.

The point is that foo.link can have more relaxed permissions, i.e., 644

  • Comment on Re^3: Writing to a file atomically without renaming

Replies are listed 'Best First'.
Re^4: Writing to a file atomically without renaming
by nomis80 (Sexton) on Jun 30, 2005 at 19:43 UTC
    Ok, but how do I make sure foo-2's owner is the same as foo-1?
      oh, I see your problem now...

      I think you can't do it without becoming root in some way... like for example, using sudo.