priority of the Linux group & user

Solution 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.