This seems straight forward enough , but i have not been able to identify how i could achive this in C++.
I am creating a file as
ofstream logfile(LOG_FILE, ios::out | ios::app);
The file is created with the following permissions.
-rw-r--r--
What i really want is
-rw-rw-rw-
For obvious reasons , i do not want to change the system umask for the same.
Thanks!
Take a look at the chmod call. This is used to change the permissions of a file.