Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: -r broken on root_squash NFS?

by pc88mxer (Vicar)
on Jun 06, 2008 at 21:37 UTC ( #690769=note: print w/replies, xml ) Need Help??


in reply to Re^2: -r broken on root_squash NFS?
in thread -r broken on root_squash NFS?

You're right. I bet perl is determining readability by calling access(2). From the man page:
  access() may not work correctly on NFS file systems  with  UID  mapping
  enabled,  because UID mapping is done on the server and hidden from the
  client, which checks permissions.
and root_squash is a server option.

Replies are listed 'Best First'.
Re^4: -r broken on root_squash NFS?
by zigdon (Deacon) on Jun 06, 2008 at 22:18 UTC
    Could be, I guess, but a quick strace shows it does call 'stat' to get the permissions. But I guess that, on it's own, doesn't tell if the root is squashed or not, so there's no way for perl to know.

    -- zigdon

      That's exactly right, there's not enough information for Perl or the OS to know. The simplest solution is to just try and open the file and see if it fails with a "permission denied" error.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://690769]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2019-06-18 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (82 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!