AW: [bf1942] chown on start?
ScratchMonkey at SewingWitch.com
Thu Jul 3 02:09:53 EDT 2003
--On Wednesday, July 02, 2003 4:25 PM +0200 Christian Lahme
<lahme at 4all-networks.de> wrote:
> We´ve traced what the server is doing with all config.files. First he
> reads everything in, deletes the file, writes the file again and after
> that it makes an chmod
Ack, what a horrible design! What happens if there's a power outage after
the files are deleted and before the new ones are written? And why chmod
instead of specifying the umask when the file is created? There's a
security risk there.
The correct method should be to rename the old file, write a new file with
the permissions copied from the old one into the open() call, then delete
the old one.
More information about the Bf1942