Description of problem: Beginning in F14, sourcing /etc/init.d/functions from a non-root cron job produces: /etc/init.d/functions: line 51: /dev/stderr: Permission denied Version-Release number of selected component (if applicable): initscripts-9.20.1-1.fc14.i686 Steps to Reproduce: echo '* * * * * someuser /bin/sh /etc/init.d/functions' >/etc/cron.d/TEST Actual results: An e-mail containing the above error is received every time the job runs. Expected results: No error.
crond attaches stderr of process to pipe - l-wx------. /proc/self/fd/2 -> pipe:[6373385] this [1] commit changed detection of console type from stdin to stderr and spread this bug. possible solution could be test if stderr is readable or revert this patch. [1] http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=f27b9adb57c38b296add2f5ee8bfed47cfdd013a;hp=9a4b00572b74450950e53d3c112070b7a20f156b
I actually see an error during the boot too: Welcome to Fedora /etc/init.d/functions: line 51: /dev/stderr: No such file or directory Starting udev: udev[300]: starting version 161 initscripts-9.20.1-1.fc14.i686
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=6890d8788cda23492f14839a890aebf457bf3725 Will be in a future F-14 update.
Created attachment 463951 [details] CONSOLETYPE - check read access to /dev/stderr This error is raised by shell running /etc/init.d/functions not by /sbin/consoletype. $ ls -l stderr --w--w----. 1 plautrba plautrba 0 Dec 1 10:03 stderr $ cat < stderr 2> /dev/null -bash: stderr: Permission denied $ sh -c 'cat < stderr' 2> /dev/null $ This patch checks read access to /dev/stderr before using it.
Applied, thx.
Package initscripts-9.20.2-1.fc14.1: * should fix your issue, * was pushed to the Fedora 14 updates-testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing initscripts-9.20.2-1.fc14.1' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1 then log in and leave karma (feedback).
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update initscripts'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
Forgive me if this is somehow different. I'm receiving this same error msg from Wicd Network Manager. Searching for clues led me here... Yum update reports: Feb 28 06:46:03 Updated: initscripts-9.20.2-1.fc14.1.x86_64 I confirmed that /etc/init.d/functions contains: ------------ # Get a sane screen width [ -z "${COLUMNS:-}" ] && COLUMNS=80 if [ -z "${CONSOLETYPE:-}" ]; then if [ -r "/dev/stderr" ]; then CONSOLETYPE="$(/sbin/consoletype < /dev/stderr)" else CONSOLETYPE="$(/sbin/consoletype)" fi fi ------------ in /var/log/wicd.log: 2011/03/24 19:04:12 :: /etc/init.d/functions: line 53: /dev/stderr: Permission d enied 2011/03/24 19:04:12 :: /etc/rc.d/init.d/functions: line 53: /dev/stderr: Permission denied