I'm trying to build a project, and when I use the command make, I get the following errors:

/bin/sh: line 4: .deps/ipset_bitmap_ipmac.Tpo: Permission denied
make[2]: *** [ipset_bitmap_ipmac.lo] Error 126

This file, .deps/ipset_bitmap_ipmac.Tpo, was created by make during the build with the following permissions: -rw-r--r--, notice that there's no x. But then make wants to execute the file immediately, which fails.

If I go to the file and add executable permissions manually, then the build continues past that point if I re-run make. Except that the make command will crash again once it reaches the next file. The only option I have is to keep chmoding every single new file.

My question is, why is make creating these new files without +x?

Side notes: I'm on CentOS5, umask -S returns: u=rwx,g=rx,o=rx, sudo doesn't help at all.


With a name like .deps/ipset_bitmap_ipmac.Tpo, it's pretty likely that the file was not meant to be executable.

What's happening here is that there's a line in the Makefile that looks like

$(SOME_VARIABLE) .deps/ipset_bitmap_ipmac.Tpo

or more likely


where the value of ANOTHER_VARIABLE is .deps/ipset_bitmap_ipmac.Tpo, or some variant on this. Due to a bug in the makefile, or in the program that generated it, or because your computer has an unsupported configuration, the variable SOME_VARIABLE (which should have been the name of the program) wasn't defined.

More help may be forthcoming if you tell us what project you're trying to build and exactly where you got it, how you unpacked it, how you configured it, what build command you ran.

  • Great observation Gilles. I'm building netfilter-ipset latest (dev is same as release currently), git://git.netfilter.org/ipset.git I'm using the following commands: ./autogen.sh; ./configure; make Apr 5 '13 at 21:58
  • I will look into the makefile to see if there's such a bug. Apr 5 '13 at 21:59
  • @RodrigoSalazar I checked it out and it looks ok, but I didn't go through the configure (it wants a patched kernel source that I don't have). Could you post the Makefile (the one in lib), and a full transcript of running make? Apr 5 '13 at 22:20
  • 1
    I finally got it working, you're right it's a makefile bug. It turns out that if I run make again it continued when it left off and then crashes on the next file. I just ran make 15 times and it completed successfully. then make install worked without a problem. Apr 5 '13 at 22:47

In your case, i think it could be other permission layer.

I've downloaded ipset 6.17 and ./configure and make ran fine.

Since make is calling /bin/sh, there is no need of execute permission, and you could test this on the following way.

Create a script without the x permission, and call it through your shell

nicolas@~> cat script

echo "teste"

nicolas@~> ls -l script
-rw-r--r-- 1 nicolas users 26 Abr  5 07:56 script

nicolas@~> sh script

Some questions:

Is selinux enabled(check with getenforce)?

What are the permissions inside the extracted ipset sources directory?

What is the ownership of the files inside .deps dir?

Have you executed config and make with sudo or su -s ?

  • I executed configure and make without sudo or su, my user is the owner of all the files in the directory, I have tried setting every thing in the directory 777, and the directory itself to 777 (but the new created file still gets -rw-r--r--). Getenforce returns "Disabled". Thanks for the help Apr 5 '13 at 18:55
  • Additional, probably not relevant note, the tar file that I extracted from has permissions of -rw-r--r--. (Though I did change the permissions of the new extracted folder to 777) Apr 5 '13 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.