I have a group of files that I cannot access via cat or vim although I have read access.

The parent directory has permissions set as follows:

drwxrws--- 2 test test_grp 94424 May 10 20:01 my_test_grp

Then the file that I would like to access has permissions set as follows:

-rwxrwx--- 1 test test_grp 3398 May 10 19:40 my_test_file.txt

When I execute id -gn, it returns the following: test_grp

When I try to execute cat, I receive the following:

cat: my_test_file.txt: Permission denied

I've tried logging out and logging back in to the terminal, to no avail. Are there any other recommended steps to remediate this issue?

Also, I do not have sudo access.

Update After doing a df -h I can see that the directory is in a location whose filesystem is a mounted NFS. Could that be a factor as well?

  • 3
    94424 is a weird size for a directory. – Tomasz May 11 '17 at 15:25
  • @ilkkachu SELinux is disabled, ls -Z on the file lists as follows: -rwxrwx--- test test_grp ? my_test_file.txt – Glenak1911 May 11 '17 at 15:29
  • Do you belong to the test_grp? – Secko May 11 '17 at 15:58
  • try newgrp test_grp and then try to acess the file – Romeo Ninov May 11 '17 at 16:39
  • @Secko Yes, I'm a part of test_grp – Glenak1911 May 11 '17 at 17:19

A possible explanation is that there are permissions on the server which NFS is unable to express. The permissions transmitted over the network are not what determines whether an access is authorized: the server gets to decide. Normally the permissions and the access control decision are based on the same information, and therefore they're consistent. However, if something along the way loses some information about permissions, then the two may be inconsistent.

Some examples of permissions that NFS is unable to express are access control lists (you're using NFSv3 which doesn't always support ACL; and NFSv4 has ACL but they aren't exactly the same as Linux's), and Linux security frameworks such as SELinux and AppArmor.

If this is the problem, then diagnosing it without access to the server would require a lot of guesswork. Without help from the server administrator, you're unlikely to resolve this problem.

  • Thanks for the explanation. I do believe this was the case, as it was reported to the administrator who manages the environment, and they were able to resolve the issue. I wasn't able to get details at the moment, but I believe this is the most correct answer in this situation. – Glenak1911 May 12 '17 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.