## function fix_pkg_perms

#### Main purpose

1. Correct the ownership and permissions of the files installed in the PKG_DIR

#### Notes

This function corrects the permissions and ownership of the files which have been copied into the PKG_DIR unless disabled with CORRECT_PKG_PERMS=NO. All file ownerships and group are set to root.
All directory permissions are set to 755 -except for and tmp or var/tmp directories which are set to 1755. The PKG_DIR is searched for ELF executable programs and they are given permissions 755.
Note that permissions for man-pages, documents and other files are handled individually in later src2pkg functions.