Karel Rank
2007-May-07 15:44 UTC
[CentOS] runuser: /dev/null permission denied when init script is run via service
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
Rodrigo Barbosa
2007-May-07 16:51 UTC
[CentOS] runuser: /dev/null permission denied when init script is run via service
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, May 07, 2007 at 05:44:33PM +0200, Karel Rank wrote:> 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/nullSounds like a SELinux issue to me. Take a look at dmesg and the audit log. []s - -- Rodrigo Barbosa "Quid quid Latine dictum sit, altum viditur" "Be excellent to each other ..." - Bill & Ted (Wyld Stallyns) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFGP1kXpdyWzQ5b5ckRAupvAKCy7PjhpWZ/2OnpYl+18zrtdyyHvACgqalF GPPufUvZ1rx2ejSY/4nCGNA=AoOG -----END PGP SIGNATURE-----