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 7535355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:17:06+00:00 2026-05-30T06:17:06+00:00

I am getting a l bit in file permission sometimes but not regulaly When

  • 0

I am getting a l bit in file permission sometimes but not regulaly When i create
file With int fd = open("\tmp\lockfile", O_CREAT | O_EXCL);. The O/P that i get in rare
scenario When i do ll \tmp\locfile is

root@cool> ll lockfile
---x--l---   1 root     nms            0 Feb 21 10:40 lockfile
root@cool>`

While most of the time O/P is this :-

root@cool> ll importer.lck
----------   1 user  nms            0 Feb 22 10:58 importer.lck`

I know creating file through O_CREAT While not providing the mode can be an issue as done
above can be an issue . In this case:-

root@cool> ll lockfile
---x--l---   1 root     nms            0 Feb 21 10:40 lockfile
root@cool>

i am not able to delete the lockfile once the process Which created this is over`.
chmod also does not work in above case but chown seems to work .

How can i prevent creating the file with these permission ---x--l--- is it just by passing mode ? The mask set is :-

root@cesme:/tmp# umask
0022
root@cesme:/tmp#`
  • 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-30T06:17:07+00:00Added an answer on May 30, 2026 at 6:17 am

    You omitted the required third parameter of open(), which is mode. (The parameter is required when you use O_CREAT). Since there’s no parameter on the stack, open uses a random value (i.e. the return address on the stack).

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

Sidebar

Related Questions

I'm getting a bit more seasoned with my iPhone development but I still don't
I am having a bit of an issue getting the file path from the
Getting a bit peeved now; I have a model and a class thats just
I am getting a bit confused. I am creating an app with storyboard, and
Switching to GCC for the first time, and I'm getting a bit confused by
I am getting myself a bit confused about how to go about this. My
I'm getting a wee bit cross, here. As far as I know, I am
So I've been getting into a bit of assembly lately and I'm a beginner
I keep getting an error with the following bit of code. It is probably
Im having a bit of trouble getting my JSON to be recognised by my

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.