-x implementations
Hans-Ch. Eckert
ripley at netmbx.UUCP
Sun Feb 3 01:30:45 AEST 1991
In article <19017 at rpp386.cactus.org> jfh at rpp386.cactus.org (John F Haugh II) writes:
]In article <8896 at star.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
]>If your effective uid is that of user `foo', whereas your real uid is
]>that of user `bar':
]>
]> $ ls -l mailbox
]> -rw------- 1 foo 1079 Jan 30 19:26 mailbox
]> $ test -r mailbox || echo 'Huh? Is mailbox unreadable for me?'
]>
]>Access(2), a sick system call. (I _know_ it uses the real uid on
]>purpose.)
You mean like this?
ripley% su alg053
(ripley)alg053% ls -l /usr/spool/mail/alg053
-rw------- 1 alg053 5940 Feb 2 02:32 /usr/spool/mail/alg053
(ripley)alg053% test -r alg053 || echo 'What happens?'
(ripley)alg053%
Seems like SunOS 4.1 does it right...
]The question test(1) is asking is wrong. test is supposed to return
]whether or not it =is= readable, not whether it =should= be readable.
At least on a sun it returns that the file is readable, which is true.
Greetings,
RIPLEY
--
Hans-Ch.Eckert, Regensburger Str. 2, D-1000 Berlin 30 [Tel: +49 030/246292]
eMail: ripley at netmbx.uucp (ripley%netmbx.uucp at db0tui6.bitnet [saves $$$])
Quote: "I'd rather type "cc fubar.c" than point-click-point-click-point-
click-point-click-knock-over-my-coffee-cup." [Steve Yelvington, 2-11-89]
More information about the Comp.unix.programmer
mailing list