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
is is one case where using fd 2 is not the same as writing to
/dev/stderr.
The solution is to switch user id's by doing 'exec login'. You'll
transfer the controlling terminal also then.
Guy
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
hello,
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)
i know there is something wrong with the permission, i can redirect if
i do it
9 matches
Mail list logo