/*
 * This function compares two 9-element char arrays that correspond to file 
 * permissions.
 * If the file has the needed permissions it returns 0, otherwise it returns 1.
 */
int check_permissions(char *file_perm, char *reqd_perm) {
    for (int i = 0; i < 10; i++) {
        if (reqd_perm[i] != "-" && reqd_perm[i] != file_perm[i]) {
            printf("missing permission in index %d\n", i);
            return 1;
        }
    }
    printf("all permissions checked");
    return 0;
}
Compare two arrays of 9 characters, but only where reqd_perm[i] != "-".