I was doing the "bof" problem on http://pwnable.kr/play.php I downloaded the "bof" file. But when I use gdb, it says as follows:
Starting program: /home/henry/Downloads/bof 
/bin/bash: /home/henry/Downloads/bof: Permission denied
/bin/bash: line 0: exec: /home/henry/Downloads/bof: cannot execute: Permission denied
During startup program exited with code 126.
bof.c:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void func(int key){
    char overflowme[32];
    printf("overflow me : ");
    gets(overflowme);   // smash me!
    if(key == 0xcafebabe){
        system("/bin/sh");
    }
    else{
        printf("Nah..\n");
    }
}
int main(int argc, char* argv[]){
    func(0xdeadbeef);
    return 0;
}
 
     
    