i initially set the file permission to 000 by the chmod command in the terminal
then i ran my programm which took command line arguments,howerver,everytime after the execution,i checked out the new permission,it was solely 777(regardless of the mode_t parameter i sepecified).
is there anything wrong with my programme or it is because of the umask system variable ,if it is,how to see it and fix it.
i finally figured it out. I think it is because of the location of the file .
I used my virtual machine(Vmware , the os is Fedora12) to do this experiment and the file to
be tested locates at /mnt/hgfs/LinuxProgramming which is a place used to place shared folders.
I tried to create the file to be tested on a another place like /root and this time i succeeded.
It turns out the file permission is User-write only as i expected.