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

  • Home
  • SEARCH
  • 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 344111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:57:37+00:00 2026-05-12T10:57:37+00:00

The following line in my C program should provided All/Group/Owner read and write permissions

  • 0

The following line in my C program should provided All/Group/Owner read and write permissions

mkfifo("/tmp/dumbPipe", 0666)

But once I execute the code and check out the permission non of the write bits were set, I end up with

prw-r--r-- 

The owners are the same, Is it a problem since I’m creating the pipe in the tmp directory? When I run chmod 666 from the cmd line all the permissions get set correctly.

  • 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-05-12T10:57:37+00:00Added an answer on May 12, 2026 at 10:57 am

    This is a no-comments post, just quoting manuals. Brievity etc.

    Quote from man 3 mkfifo:

    It is modified by the process’s umask in the usual way: the permissions of the created file are (mode & ~umask).

    Quote from man 2 umask

    The typical default value for the process umask is S_IWGRP | S_IWOTH (octal 022). In the usual case where the mode argument to
    open(2) is specified as:

          S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
    
      (octal 0666) when creating a new file, the permissions on the resulting file will be:
    
          S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
    
      (because 0666 & ~022 = 0644; i.e., rw-r--r--).
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written the following program to read line by line from a file and
This is my program - (void)viewDidLoad { [super viewDidLoad]; // Uncomment the following line
I launch the following command line (process) from a Windows VC++ 6 program using
the following is a line from a python program that calls the demo.exe file.
The following code is causing me some problems. The third line causes a program
I want to write a small program that should print something like testing CPU...
I've got a C# .NET program here with the following line for loading strings:
In the following program, the line 5 does give overflow warning as expected, but
The following line printed output as 4 whereas I was expecting 0. printk(KERN_INFO size
The following line of code generates the compile time error (PE19) There is no

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.