I am new to OSX development and i need your help please.
I am trying to make folder on /private/var/tmp using mkdir from my OSX app written in c++. I am using XCode 3.2.6 on OSX 10.6. The command works well. The folder is created in the path /private/var/tmp.
That’s what i’ve done in the application : mkdir(my_path, 0777);
But i have a problem in the permissions of the folder. The user can modify the folder (make another folder inside, etc..) but not “everyone” or “wheel”.

Translation :
- Moi -> Me
- Lecture et écriture -> Read and Write
- Lecture seulement -> Read only
I have try to make folder from terminal, i type mkdir -m 777 /private/var/tmp/test and the folder test has the good permissions :

Translation :
- Moi -> Me
- Lecture et écriture -> Read and Write
My question is, how can i do to make write permissions on the folder and from my OSX app.
Thank you.
According to SUIS
The reason is default umask defined for your system.
So you just need to update umask from your process before calling mkdir or call chown to update attributes for created folder.