Subject Re: Running Firebird with a non-admin user (Windows)
Author Adam
--- In firebird-support@yahoogroups.com, "Thomas Kellerer"
<IJFQSFTGESJU@...> wrote:
>
> Hi all,
>
> I had some trouble running Firebird with a non-admin user and I wanted
> to share the solution. Maybe this is something that could be included
> in the quick start or FAQ.
>
> I installed Firebird into %ProgramFiles% (only writeable with Admin
> user rights) from the ZIP distribution and the engine started fine.
> I could even connect (having the .fdb file outside the Firebird
> directory).
>
> But when I tried to create a new user using GSEC I got the infamous
> "could not connect to database" message - which is covered by the
> quick start guide, but in this case the reason was plain simple:
>
> The error was caused by the fact that the user account under which
> Firebird is running did not have the rights to write to security2.fdb.
>
> So after changing the permissions for that file, everything was
> working fine.
> The permissions for firebird.log needed to be changed as well IIRC.
>
> The quick start guide lists several potential problems in the chapter
> "User management: gsec", I think this problem should be added there as
> well.
>
> If I had installed Firebird using the installer, would that have set
> the permissions correctly?

If you had installed it as a service using the installer, Firebird
would be running by default as SYSTEM or LOCALSYSTEM, which has
administrator rights.

If you install it as an application (surely this is only useful for
developers now), the user running the application would need
permissions to write to the security database. If you have put
Firebird in Program Files, then that is an administrator. You could
use runas (Windows version of Sudo) to launch just that process
elevated to administrator, or install it somewhere less significant.

Running as a service has the benefits of being sure it is running,
having failure actions such as running a program (like a sendmail
equivalent so you know it has restarted), automatic restarts etc. It
also lets your own service applications list Firebird as a dependency,
so Windows wont start your Application until Firebird is running.

I am not against adding your suggestion to a FAQ / QSG things to check
list, but I doubt it is a common problem because most people use the
installer and install as a service.

Adam