[CentOS] runuser: /dev/null permission denied when init script is run via service

Mon May 7 15:44:33 UTC 2007
Karel Rank <karel.rank at zoomint.com>

Hi,

I have problem with runuser utility and permission to /dev/null. runuser is
called from init script. When init script is run /etc/init.d/callrec start, then
there are no problems with permissions, but when init script is called via
service callrec start. Then runuser starts complaining about permissions.

runuser: /dev/null: Permission denied

What is strange is that I do not redirect to /dev/null anywhere. Permissions to
/dev/null are:

crw-rw-rw- 1 root root 1, 3 Apr 16 16:39 /dev/null

The difference between calling init script from command line and from service
tool is that service calls script as parameter of env

env -i LANG=en_US.UTF-8 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin TERM=xterm  /etc/init.d/callrec start

CentOS is 4.3.

Can somebody explain me where the problem is?

Regards,
Karel Rank