On Tue, Sep 23, 2003 at 03:01:47PM -0500, Dan Muey wrote:
> To see if the script running via the webserver can read a
> file I'd use -r and not -R right?  If the file is owned by
> root then -R would return true if root has read permisions
> right?

Not really -- it tells you whether the "real" uid/gid can
read the file.  You're allowed to swap the real and effective
user and group ids (for instance, if the script was running
setuid) so this might be useful to know.

> But -r would tell me if the current user running the script
> can read it, right?

Yes, but...

> IE
> if(-r $file) { open(.....

This is silly.  Just open it and check for the error.

-- 
Steve

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to