Hi everyone!
I want to write a simple program in C that creates a file with 775 permissions, using the open command. Im not sure which mode arguments I need to make that happen with open.
Can someone help me out?
heres what I have:


Code:
#include <sys/types.h>   //Specified in man 2 open
#include <stdlib.h>
#include <errno.h>  	 //Allows use of error numbers
#include <fcntl.h>       //Specified in man 2 open
#include <stdio.h>

int main(int argc, char ** argv){ 
  FILE *fp;
  fp = open("argv[1]", "O_CREAT", "MODE???");

  close(fp);  /* Close the file */
return 0;
}