Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:24:28+00:00 2026-06-17T06:24:28+00:00

I am new to OSX development and i need your help please. I am

  • 0

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”.

enter image description here

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 :

enter image description here

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:24:29+00:00Added an answer on June 17, 2026 at 6:24 am

    According to SUIS

    The mkdir() function shall create a new directory with name path. The file permission bits of the new directory shall be initialized from mode. These file permission bits of the mode argument shall be modified by the process’ file creation mask.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to OSX App development.I am trying to store 4 values (Date,
I'm totally new to iPhone/OSX development and I'm trying to sort an NSMutableArray filled
I am fairly new to OSX development, so this may be easy but google
I am new at Mac OSx development. The app that I am creating requires
I am new to OSX user space development. I've read documentation and googled before
I'm trying to define a new URL handler under OSX that will point at
In OSX I have the following code. Using gcc 4.0.1. I'm new to OSX
I am new to Mac development and are trying to understand the location that
I am new to OSX App development and finds things a little different from
I am very new to MAC OSX development but I had a good expirience

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.