int check_permissions(char *first, char *second) {
    // first array represent the permission field of a file
    // second array represent permissions that are required

    int result = 0;
    int i;
    for (i = 0; i < 9; i++) {
        if (second[i] != '-') {
            if (first[i] != second[i]) {
                result = 1;
            }
        }
    }
    return result;
}
the code returns 0 if for every element that is not '-' in the second array, it is included in the first array