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

Re: writing to /dev/stderr



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 bruce    bruce 64 Aug 30 16:16 /dev/fd/2 -> [0301]:7060

This means "device 3, 1, inode 7060".

> ls -li `tty`
   7060 crw-rw-rw-   1 root     tty        4, 193 Aug 30 16:16 /dev/ttyp1

Note the "7060".

> ls -li /dev/hda1
   6237 brw-rw----   1 root     disk       3,   1 Dec 31  1969 /dev/hda1

That's the root partition. Note the "3, 1"

It's the permissions of /dev/ttyp1 that apply here, not those of /dev/fd/2 .

        Bruce



Reply to: