makefile permission denied

makefile, permission-denied

Solution

This is simple. It needs executable rights.

chmod +x mazeIO

You can also use chmod if it needs to be executed by other users. `man chmod` will give you the numeric values needed if it needs to be executed by other users. Be wary of giving full executable, read, and write rights (`chmod 777`)

`chmod 600` will not make it executable.

Problem

I'm trying to make a C++ program that will find the shortest route out of the a maze. I'm struggling to get my makefile to work right now though. Currently, my makefile contains the following: ``` mazeIO : mazeIO.cpp maze.h g++ -g -Wall mazeIO.cpp maze.h -o mazeIO ``` mazeIO.cpp and maze.h are the only two files I have in the project. In the command line I am typing ``` make -f Makefile ``` and it compiles fine. Then I am typing ``` ./mazeIO maze.txt ``` maze.txt is the maze input that I am trying to navigate. After I type this in I get the following error: ``` bash: ./mazeIO: Permission denied ``` I do not understand why. Any suggestions?

Original source