The basic answer is you don't have permissions to write to /dev/null
Not trying to be facetious - just that the message is telling you the problem.
As root simply type "chmod 666 /dev/null". A subsequent "ls -l /dev/null" should show it now has "crw-rw-rw-" in the left most column. (For more details on the chmod command type "man chmod".)
DETAILED RESPONSE FOLLOWS:
Quote:
crw-r--r-- 1 root root 1, 3 Nov 11 18:46 /dev/null
|
The left column of this entry is telling you it is a c(haracter) device that has r(ead) and w(rite) for the owner but only r(ead) for group and r(ead) for all other users. the "root root" later in line tells you the owner is called root and the group is also called root. (Despite same name owner and group are two different things - owners in /etc/passwd and groups in /etc/group.) Anyway since owner is root and its writable ONLY by owner it means only root can write to it. Since /dev/null is a bit bucket there's no reason to restrict it that way. It should be writable by all.
Of course what's got me wondering is why the hell its trying to access /dev/null in the first place. Maybe it always has and I just didn't realize it. Typically /dev/null is where you redirect unwanted output so it doesn't appear on your screen or in a log file. For example typing:
'ls -l >/dev/null" would send output to /dev/null so you'd never see it on the screen. Its common in background scripts such as init scripts or cron to redirect unwanted output as follows:
myscript.sh >/dev/null 2>&1
The above says to send standard output (stdout a/k/a file descriptor 1) to /dev/null instead of the default (normally the terminal) then says to redirect standard error (stderr a/k/a file descriptor 2) to file descriptor 1 which has been redefined as /dev/null earlier on the line.
P.S. RedHat 9 is rather old. Unless you have a specific need for it you might want to install the latest RedHat non-commercial Linux which is Fedora Core 4 (or at least Fedora Core 3 - the 2.6 kernel in 4 is still giving folks some issues but Fedora Core 3 is a lot later.) RedHat has split their commercial and non-commercial so that RedHat branded stuff (RedHat EL/AS) is commercial and Fedora is non-commercial