Subject Re: [firebird-support] How to start Firebird server, and how to connect (on Linux)?
Author that.SelectedDude
Thanks for the information on file permissions and related issues!

> Start the (x)inetd and that should do it:
>
> /etc/init.d/inetd start
>
> or
>
> /etc/init.d/xinetd start
>
> or maybe:
>
> service xinetd start
>
> I don't recall how exactly is it done on Ubuntu.

Calling "/etc/init.d/inetd start" would be conform on Ubuntu, i.e.,
Apache is started that way.

Unfortunately, neither inetd nor xinetd exist on my system.

They are neither contained in the setup nor do the setup scripts try to
create them. This is FirebirdCS-1.5.3.4870-0.i686.

Related things setup does, though, are:
1. Adding two lines to /etc/services:
gds_db 3050/tcp # InterBase server
gds_db 3050/udp

2. Adding a line to /etc/inetd.conf:
gds_db stream tcp nowait.30000
firebird /opt/firebird/bin/fb_inet_server fb_inet_server # Firebird
Database Remote Server

3. Installing the file /opt/firebird/misc/firebird.xinetd, that
contains:
service gds_db
{
flags = REUSE
socket_type = stream
wait = no
user = firebird
# These lines cause problems with Windows XP SP2 clients
# using default firewall configuration (SF#1065511)
# log_on_success += USERID
# log_on_failure += USERID
server = /opt/firebird/bin/fb_inet_server
disable = no
}

So [1] would instruct the operating system to listen at port 3050, which
it not does, and to bind requests to a service named gds_db.
[2] would bind the executable fb_inet_server to the gds_db service.
[3] would be read by fb_inet_server. Wait: The server executable itself
is specified there. This would mean this file would be read by the
system. However, how can the operating system know of a file
in /opt/firebird?

- After all, as (x)inetd does not exist, I really don't know which
executable to start (or would the above chain suffice - to me, it
appears broken).

Could possibly someone post the contents of their (x)inetd file(s)?

Any other ideas?

Thanks
Robert


On Wed, 2006-08-02 at 21:00 +0200, Milan Babuskov wrote:
> that.SelectedDude wrote:
> > 1. A normal Linux user cannot connect to the database
>
> That is expected.
>
> > # Try to connect to the database as SYSDBA:
> > ##### unexpected: #####
> > SQL> connect /opt/firebird/examples/employee.fdb user 'sysdba'
> password
> > 'xxxxx';
> > Statement failed, SQLCODE = -902
> >
> > operating system directive open failed
> > -Permission denied
>
> No wonder. You need to use:
>
> localhost:/opt/firebird/example/employee.fdb
>
> You are still a local user, and not "firebird" or "root". In this
> case,
> SYSDBA username/password is ignored.
>
> > User robert is in the firebird group (I've added him manually):
> > robert@ubuntu:~$ groups robert
> > robert : robert adm dialout cdrom floppy audio dip video plugdev
> lpadmin
> > scanner admin firebird
>
> You need to log out and log back in for group changes to take effect
> (although I doubt that has any effect on the problem).
>
> > And, why can't one connect using the database user in the connection
> > statement? Should'nt FireBird change the process's identity to
> firebird
> > in that case (as it would be with SQL Server, I believe)?
>
> If you say "localhost:" it connects to port 3050, and (x)inetd starts
> fb_inet_server. If you don't say "localhost:" there is no way for it
> to
> assume identity of another user (unless you prehaps set the setuid
> bit
> on isql (chmod +s), but I urge you not to).
>
> I'm not sure what you mean by "SQL Server". Only "SQL Server" I know
> of
> is Microsoft product and doesn't run on Linux. Privilege system is
> somewhat different on Windows.
>
> > robert@ubuntu:~$ sudo iptables -t nat --list
>
> This should have been:
>
> iptables -t filter --list
>
> Sorry about that.
>
> > Port 3050 is not open.
> > inetd appears to be running:
> > robert@ubuntu:~$ ps ax | grep inetd
> > 10015 pts/18 S+ 0:00 grep inetd
>
> NO, it isn't !!!
>
> You only got your "grep" command here. Start the (x)inetd and that
> should do it:
>
> /etc/init.d/inetd start
>
> or
>
> /etc/init.d/xinetd start
>
> or maybe:
>
> service xinetd start
>
> I don't recall how exactly is it done on Ubuntu.
>
> --
> Milan Babuskov
> http://swoes.blogspot.com/
> http://www.flamerobin.org
>
>
>
>
>