Overview
| Artifact ID: | d86ca1b6191708977be6a8b400e547371afedc0f |
|---|---|
| Ticket: | 1617990fffffffffffffffffffffffffffffffff
Incorrect result of access() for NFS mounted files |
| User & Date: | decosterjos on 2006-12-18 12:48:34 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
Hi, When running test cmdAH-16.3 on an NFS mounted file system, the 'file readable' command returned the incorrect result. Running some test with the access system call as used in the TclpObjAccess function showed the problem. This was the test program: #include <iostream> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> int main() { std::cout << "access: " << access("gorp.file", R_OK) << std::endl; struct stat st; int rt = stat("gorp.file", &st); std::cout << "stat mode: " << std::oct << st.st_mode << std::dec << std::endl; std::cout << "& S_IRUSR = " << (st.st_mode & S_IRUSR) << std::endl; return 0; } The result of running this program on the NFS mounted file system was: access: 0 ===> expected -1 stat mode: 100333 & S_IRUSR = 0 The result of running this program on the local file system was: access: -1 stat mode: 100333 & S_IRUSR = 0 access reports the NFS file incorrectly as being readable while stat always return the correct result. Kind regards, Jos. - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "decosterjos"
- subsystem changed to: "37. File System"
- title changed to: "Incorrect result of access() for NFS mounted files"
- type changed to: "Bug"