On 21 December 2010 16:24, ali hagigat wrote: > When I use /bin/sh and execute the following command: > gcc -o prog.o prog.c > prog.o does not have execute permission(I am talking about > read/write/execute attributes of the file owner, group and others). > > Can i configure shell(/bin/sh) or ( some other component of the Linux > operating system) somehow to force gcc to create the file, prog.o,with > execute attribute set? > or the issue is not related to the shell (or OS) and gcc always create > these object file names like prog.o without executable attribute? (prog.o is not an object file, it's an executable, so why are you calling it .o ?) gcc creates exeuctable files with executable permissions. It doesn't create object files with executable permissions, because they're not executables, they're object files. If you don't get executable permissions it might be because of your shell's 'umask' setting.