About file attributes, process attributes and file permissions on Unix/Linux
System.
1. current working directory, environment variables, umask value are all
Attributes of a process.
The real User ID, real group ID, valid tive user ID, valid tive group ID,
And supplymentary user ID and supplymentary group ID are attributes of
Process. The real user ID and group ID are ones who start the process (run
Program). The specified tive user ID and group ID usually equal to real user ID and
Group ID. But if the set-user-ID bit of a file is set, the valid user ID and
Group ID are forced to be the owner of the file and the group owner of the file.
2. st_uid, st_gid are attributes of a file, st_uid is owner of file, st_gid is
The group to which the file/use belong. st_uid and st_gid usually eaqual to
Use logging on and the group he/she belongs to. Both st_uid and st_gid can be
Found in/etc/passwd file.