bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't redirect to `/dev/stderr' (Permission denied)


From: Davis, Ricardo C.
Subject: Can't redirect to `/dev/stderr' (Permission denied)
Date: Tue, 22 May 2001 14:25:37 -0400

Hi,

I'm using a GNU/Linux system (Red Hat 6.2 running kernel 2.2.19-6.2.1).  I
have a number of applications that use gawk.  One in particular is
mission-critical that was working well as of 5/8/2001 (the last time the
gawk program was used).  Today I tested it and noticed that the gawk program
failed at the point where it printed output to stderr.  I checked the RPM
package information on gawk:
__________________________________________________________________________

Name        : gawk                         Relocations: (not relocateable)
Version     : 3.0.4                             Vendor: Red Hat, Inc.
Release     : 2                             Build Date: Thu 03 Feb 2000
09:23:05 AM EST
Install date: Tue 20 Feb 2001 11:02:03 AM EST      Build Host:
porky.devel.redhat.com
Group       : Applications/Text             Source RPM: gawk-3.0.4-2.src.rpm
Size        : 2357406                          License: GPL
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : The GNU version of the awk text processing utility.
Description :
The gawk packages contains the GNU version of awk, a text processing
utility.  Awk interprets a special-purpose programming language to do
quick and easy text pattern matching and reformatting jobs.

Install the gawk package if you need a text processing utility. Gawk is
considered to be a standard Linux tool for processing text.
__________________________________________________________________________


I then attempted to isolate it to the smallest possible awk program and
input data file that reproduces the problem.  Here's the test file
(gawktest):
__________________________________________________________________________

This is a test gawk file.
I think that something is broken.
__________________________________________________________________________


After reviewing the information in the "Special File Names in gawk" section
(http://www.gnu.org/manual/gawk/html_node/gawk_65.html#SEC66), I attempted
to run a "one-liner" gawk program using file "gawktest" as input; here's the
result:
__________________________________________________________________________

$ gawk '{print $0 > "/dev/stderr";}' gawktest  
gawk: cmd. line:1: (FILENAME=gawktest FNR=1) fatal: can't redirect to
`/dev/stderr' (Permission denied)
__________________________________________________________________________


This should have printed each line of input on stderr.  Using "/dev/fd/2"
instead of "/dev/stderr" yields the same error.

So I decided to take a look at what has software has been changed on the
server since the last time the gawk script with the redirect to stderr:
__________________________________________________________________________

$ rpm -qa --queryformat '%{installtime} %{name}-%{version}-%{release}
%{installtime:date}\n' | sort -nr +1 | sed -e 's/^[^ ]* //' | head -5
mktemp-1.5-2.1.6x Tue 22 May 2001 12:19:14 PM EDT
man-1.5i-0.6x.1 Tue 22 May 2001 12:19:14 PM EDT
krb5-libs-1.1.1-27 Fri 18 May 2001 02:03:15 AM EDT
krb5-configs-1.1.1-27 Fri 18 May 2001 02:03:14 AM EDT
gnupg-1.0.5-0.6.x Fri 18 May 2001 02:03:14 AM EDT
__________________________________________________________________________


Hmmm ... does gawk use mktemp?  I suspect it probably does and that the most
recent version has caused the problem.  

Sincerely,



Ricardo Davis
--------------------------------------------------------------------
                    Intermedia Communications
Ricardo Davis                                ABN-Information Systems
770-980-6000(Office)                               770-980-6003(Fax)
address@hidden       http://www.intermedia.com/products/abn/
--------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]