opening a file and file permisions

Hi all

I have a question

If I open a file in such a way

file_des = open(LOGS_PATH, O_WRONLY | O_CREAT | O_APPEND );
if( file_des != -1 )
{
strcat(message,"\n");
write( file_des,message,strlen(message) );
close(file_des);
}

the file which is being created has such file permisions
—SrwL— , what does it mean?

when I use fopen function I got rw-rw-r-- and this is what I want to have. How to change the file persmisions in C to have rw-rw-r–, or am I doing somthing wrong?

The O_CREAT flag requires a third argument (mode) to the open().
The access permission bits (see <sys/stat.h> of the file mode are set to the value of the “mode”, as modified by umask.

Check this document for details.