int check_permissions(char *file, char *required){
    int result = 1;
    int i;
    for (i = 0; i < 9 ; i++){
    	if (file[i] != required[i] && required[i] != '-'){
            result = 0;
        }
    }
    return result;
}

check whether two string match with some tolerance
