I have an Isilon NAS on 10.20.30.11, for example, and I mounted it as follows:
mount 10.20.30.11:/folder /content
I could use the ls to find the file in the /content folder. Its mod is 777.
bash-3.00
But I canβt access it with the access () function.
#include <iostream> #include <string> #include <unistd.h> #include <cerrno> using namespace std; #include <stdio.h> int main( int argc, const char* argv[] ) { int returnVal = 0; returnVal = access(argv[1], R_OK); cout << returnVal << endl; cout << errno << endl; return 0; }
As a result, it will return -1 and 2, which means "There is no such file or directory."
./a.out /content/a/b/1.txt -1 2 #define ENOENT 2
This is not a permission problem, I think, because the mod is 777, and the result is "There is no such file or directory."
source share