Subject Re: [firebird-support] Re: Can overwrite database file while open - FB 2.5
Author Michael Ludwig
technisoft2005 schrieb am 11.12.2010 um 05:35 (-0000):
> --- In, Michael Ludwig <milu71@...>
> wrote:
> > > I use the Windows explorer to copy the file from sf1\DATA.FDB into
> > > the files folder, even though files\DATA.FDB is open it succeeds.
> >
> > Okay, you're clobbering your database.
> Sure, but I don't think that this was possible with FB2.1 and a
> superserver installation.

Okay, so let's give it a try:

C:\Programme\Firebird\Firebird_2_1\bin\fbserver.exe -a

create database 'T:\data\Firebird21\a.fdb' user 'milu' password 'test';

In another cmd.exe:

T:\ :: touch a.fdb
T:\ :: move /y a.fdb data\Firebird21
Zugriff verweigert ( = access denied )

Okay, it doesn't work in this scenario. Note that server and clobberer
are the same user here, admin users on XP Home. So now let's try
Firebird 2.5 (on another port):

C:\Programme\Firebird\Firebird_2_5\bin\fbserver.exe -a

Then create the database and the table just like above.

T:\ :: touch a.fdb
T:\ :: move /y a.fdb data\Firebird25
Zugriff verweigert

Same outcome. Also for Explorer instead of MOVE. Versions used:

WI-V2.1.3.18185 Firebird 2.1
WI-V2.5.0.25920 Firebird 2.5 Release Candidate 2
WI-V2.5.0.26074 Firebird 2.5 (noticed I was still running RC2)

But I'm sure there is a scenario where you can simply ignore the
warning and clobber the file. Say you are administrator and Firebird
isn't. What is the exact scenario that allowed you to successfully
clobber your database?

And sorry for the meteor impacts! :-)

Michael Ludwig