Firefox bookmarks gone! (more info)

Dave Miller justdave at canonical.com
Wed Oct 13 19:56:06 UTC 2004


Kevin Krumwiede wrote:
> On Wed, 13 Oct 2004 03:05:29 -0400
> Dave Miller <justdave at canonical.com> wrote:
> 
>>Actually, what more likely happened is it loaded YOUR bookmark file
>>fine when you ran it as root, then saved it again AS ROOT to your
>>profile directory.  The bookmarks file is then owned by root, and
>>readable only by root.
> 
> Why would opening and saving a file as root change its ownership or
> permissions?

Because in order to avoid corrupting the file if you run out of disk 
space while it's writing it, it writes a new temporary file first, to 
make sure all the data fits on the disk, then once it has it all on 
disk, it renames it overtop of the original.  This is a common practice 
in Linux for files that contain critical data, so that data doesn't get 
lost if your disk is full. (It also avoid concurrent access issues, if 
more than one process has the file open at the same time)

-- 
  - justdave




More information about the ubuntu-users mailing list