I'm learning UNIX file permissions / ID inheritance and would like to clarify something:
I have this list of permissions, users, groups and files:
-rwxr-xr-x userA A foo -rw-rwsr-x userB B bar
- RealUID of userA is 100, GroupID of userA is 240
- RealUID of userB is 102, GroupID of userB is 241
I need to know what would happen if userB executes
Does userB's RealUID change to userA's RealUID?
Does userB's EffectiveUID change to userA's EffectiveUID?
Since userB is executing a file of userA, does userB's RealUID get saved into SavedUID, then after executing, it reverts back to normal?
Does executing file also changes userB's GroupID?