0

My current user & group is baohua-baohua.If I create a file belonging to baohua-test, the priority of the user is higher than that of the group (if the user's permission is rw-, the file is rw).If I create a file belonging to test-baohua, the priority of the group is higher than that of the user (if the group's permission is rw-, the file is rw). for example:

enter image description here

enter image description here

Why is that

music2myear
  • 40,472
  • 44
  • 86
  • 127
jw__fu
  • 1

1 Answers1

1

Assumption: no ACL.

  • Are you the user that owns the file?
    • Yes → The owner's permissions matter. Nothing else matters. End procedure.
      (The file belonging to baohua:test fits this case.)
    • No → Are you in the group that owns the file?
      • Yes → The group's permissions matter. Nothing else matters. End procedure.
        (The file belonging to test:baohua fits this case.)
      • No → The other's permissions matter. End procedure.
Kamil Maciorowski
  • 69,815
  • 22
  • 136
  • 202
  • Thanks for you.I don't know ACL.Now,I know.I will read it. – jw__fu Sep 11 '20 at 13:17
  • @jw__fu My answer does not require you to know Access Control Lists, it assumes you *didn't use* them. I would say it's a somewhat advanced topic. I mentioned ACL only because if there were some surprising entries in the list associated with the file in consideration, then we would need to analyze them. This could complicate the answer *unnecessarily*. In most cases these `rwx` permissions one can find in the output of `ls -l` are enough. Your question is clearly about the `rwx` model. You admit you didn't know ACL, most likely you didn't use them, so my assumption is justified. – Kamil Maciorowski Sep 11 '20 at 16:06
  • Yes,I understand your answer.I attempt try it many times and I discover this pattern.I think ACL may be have others gains.That's good. – jw__fu Sep 14 '20 at 02:39