On Fri, 30 Aug 1996, Bruce Perens wrote:
> It's the permissions of /dev/ttyp1 that apply here, not those of /dev/fd/2 .
Just like in a symbolic link.
Guy
On Fri, 30 Aug 1996, Alex Romosan wrote:
> the links were okay, the problem is elsewhere. if i telnet into the
> machine and log in as alex gawk works fine. what i usually do is to
> rlogin from an sgi to a different account and then su to alex. under
> these circumstances gawk fails with permissi
I looked at this a little more. It seems that the object on the other
side of /dev/fd/X isn't always one that you have permissions on _after_
it's been opened.
> ls -l /dev/fd/2
lrwx-- 1 brucebruce 64 Aug 30 16:16 /dev/fd/2 -> [0301]:7060
This means "device 3, 1, inode 7060".
> ls -li
> echo test | gawk '{print $0 > "/dev/fd/2";}'
>
> gawk: cmd. line:1: (FILENAME=- FNR=1) fatal: can't redirect to
> `/dev/fd/2' (Permission denied)
There's a kernel bug operating here, I think. If you chmod 666 /dev/fd/2
(from the same console, of course) it shows no change in its mode using
"ls",
>
>Check that /dev/fd is a symbolic link to /proc/self/fd. Check that
>/proc is mounted.
>
>The permissions to /proc are determined by the kernel, so there's
>really no way that they could be wrong.
>
>
>
>Guy
>
the links were okay, the problem is elsewhere. if i telnet into the
machine and log in
On Fri, 30 Aug 1996, Alex Romosan wrote:
> i've tried:
>
> echo test | gawk '{print $0 > "/dev/stderr";}'
>
> and
>
> echo test | gawk '{print $0 > "/dev/fd/2";}'
>
> and both give me the same error:
>
> gawk: cmd. line:1: (FILENAME=- FNR=1) fatal: can't redirect to
> `/dev/fd/2' (Permission
>
>That should work, for example
> gawk '{print $0 > "/dev/stderr";}'
>copies its input to stderr.
>
>It's not a permissions problem; /dev/std{in,out,err} and /dev/fd/n are
>implemented internally by gawk. They're not really files on the
>system. Well, actually /dev/fd/n really is a symlink
On Fri, 30 Aug 1996, Alex Romosan wrote:
> i am trying to print to /dev/stderr from within gawk
> (print $0 > "/dev/stderr") but i get the following error:
>
> gawk: cmd. line:30: (FILENAME=- FNR=1) fatal: can't redirect to
> `/dev/stderr' (Permission denied)
That should work, for example
8 matches
Mail list logo