permission denied during transfer

Danny Mayer mayer at gis.net
Wed Nov 27 21:21:00 UTC 2002


At 07:29 PM 11/26/02, Mark_Andrews at isc.org wrote:
> > yes,, named can wirte to the file
>
>         The question is can named write to the DIRECTORY.  Named
>         creates a NEW file, writes the zone's contents to it.  Named
>         then renames the NEW file to the name specified in named.conf.
>         This ensures that there is always a *complete* copy of the
>         master file in the event of power failure.
>
>         [ Windows does not support atomic rename so there is a small
>         window of time where the file does not exist under Windows.
>         However if the file does exist it will be complete which
>         is what is required for a slave. ]

Windows does a "safe" rename in that it renames the old file if it exists
and the renames the new file to the new name and then deletes the
renamed old file. In case of failure during these operations, the old file is
still there on disk. In hindesight, the MS MoveFileEx() function should
have been used, though I can't find anywhere that it's documented that
it's an atomic operation. It certainly would make the code a lot more
straightforward.

Danny

>         Mark
>



More information about the bind-users mailing list