makefile update and permissions fix