After the following code runs, file tasty has permission bits set to 0700
, which is unexpected.
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
int fild = creat("tasty", 0722);
close(fild);
return 0;
}
How to allow everybody to write into the file?