Re: Difference between informix & root
Posted in 1998
Stefan Weideneder wrote:
>
> Kenneth Ma wrote:
> >
> > Hi all:
> >
> > What is the difference of starting the engine between user informix and
> > root?
> > Do you see any problem if user with DBA priviledge to start the engine
> > with
> > command 'oninit'? Or will it be started?
> >
> > THANKS in advance !!!!!
> >
> > Kenneth Ma
>
> Hi Kenneth,
>
> as long as you installed the Informix products properly there's
> no significant difference whether you start the oninit by root
> or informix.
> "oninit" has set the "set-user-id" bit and is owned by "root".
> Therefore the effective user id will be root, even if "oninit"
> is started by the user "informix".
Everyone is correct, the engine does not care who starts it.
There three reasons that I know of actually.
1) If you use OS utilities to set processor affinity or aging
parameters these tasks must be run by root because oninit is an SUID
root program.
2) Also on some system, and with some Logical Volume Managers, the
permissions and ownership of raw devices will be 666 root root after a
system boot. This is because the devices are created by an rc script
AFTER the kernel boots. LVM devices are not known to the kernel
directly and are typically not created by the kernel's device search at
startup. Because of this the rc script to start the engine has to reset
the permissions and ownership of the chunks before starting the engine.
If the directory containing the softlinks to the disk devices has not
been mounted at boot time, perhaps because it needed to be fsck'd, then
the engine will need to be started manually and only root can fix the
permissions. Therefore, for both of these reasons, we always run the
startup script, oninit.sh, as root either from the rc script or by
hand.
3) This one bites me every once in a while when the SysAdmin installs
a new OS. He does this by creating a new root filesystem with the new
kernel and booting from that. This lets him quickly revert to the old
kernel without worrying which system files have been changed for the
new kernel, etc. However, he never remembers to create the directory
/INFORMIXTMP and if you start the engine as informix the oninit will
not have permissions to create the directory itself. Typically when a
new kernel is booted there is some filesystem that does not mount and
the rc scripts do not complete and an operator tries to start the engine
by hand after everything is straightened out as Informix. I ALWAYS ask
"Why didn't you just do: init 1 then init 3 and let the rc script
restart everything?" but then I'm not the sysadmin... Invariable it
takes me a hour to discover that the kernel has been upgraded without
my knowledge and all I need to do is start the engine as root. So I
just always do.
Anyway there are three GOTCHAs that have prompted me to ALWAYS start
the engine as root. Now if I could convince the operators and the DBAs
that work for me to do the same. To bad I'm not a strutting autocrat,
I imagine that their lives are so much simpler than mine. :-)
Art S. Kagel