Background
I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1
I asked Bob to give me permission to read all contents of
inputs
:[bob@server]$ chmod -R a+r /home/bob/inputs/*
I linked these to a shared directory:
[david@server]$ ln -s /home/bob/inputs/ /home/share/inputs/
My (Fortran) program tried to read
/home/share/inputs/input_1
and said:File /home/share/inputs/input_1 not found!
I tried to locate the file myself (in the process, bob gave
a+rwx
permissions):[david@server]$ls -ltrh /home/share/inputs/input_1 lrwxrwxrwx 1 bob bob 33 Oct 25 15:42 /home/share/inputs/input_1 -> /home/bob/inputs/input_1
From this, I concluded that a)
inputs_1
exists and b) all users haverwx
permission.I tried to read it:
[david@server]$ more /home/share/inputs/input_1 /home/share/inputs/input_1: No such file or directory
And am told that it does not exist.
I look for the target file
/home/bob/inputs/input_1
but am denied permission.[david@server]$ls -ltrh /home/bob/inputs/input_1 ls: /home/bob/inputs/input_1 Permission denied
Something bizzare happens if I
ls
the directory contents:[david@server]$ls -ltrh /home/bob/inputs/ ?--------- ? ? ? ? ? input_1 ?--------- ? ? ? ? ? input_2 ?--------- ? ? ? ? ? input_3 ... (n-4 lines omitted) ?--------- ? ? ? ? ? input_n
although if bob does this, he gets:
-rwxrwxrwx 1 bob bob 269 May 24 input_1 ... (n-2 lines omitted) -rwxrwxrwx 1 bob bob 2.0K Jan 19 input_n
Questions:
- Is there a simple explanation for this apparently (to me) inconsistent behavior?
- Where do I go from here?
chmod a+r *
would be sufficient. – David LeBauer Oct 26 '12 at 22:02