Due Date: August 13, 2017 23:59 hours
The project developed in Lab #2 and #3 part 1 will be extended by this one. Using stat you will need to open each file within a child process and determine the following: the user ID and the group ID and then compare these to the current user. The 3 cases are: if the user is the owner, the user is in the same group as the owner, or if the owner is outside of the user group. After that information is printed, then print the combination of file permissions that apply to this file: read, write, execute.  Sample code: man stat, man 2 stat, man getpwuid, man readdir, man 3 scandir, and fileaccess.c
 Program requirements:
  1. The program should take either filenames or wildcards (*.c for example) as input.
  2. Create as many child processes as there are files on the command line.
  3. (you may remove the ps -H) The parent process should wait for all the children to finish and then print “ps -H”
  4. For each child process:
5. If no filename is specified on the command prompt, use dirent to retrieve all files in the current folder.  Modular code will make this task much easier, but is not required.
6. Use the output from stat to determine the owner of the file, and then use the passwd structure on the owner of the file to determine the home directory of the user that owns that file.
(example below)
                                                                                                  Last Revised: August 14, 2017