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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:03:41+00:00 2026-05-23T04:03:41+00:00

I am making the following call to the Apache Portable Runtime library (version 1.4):

  • 0

I am making the following call to the Apache Portable Runtime library (version 1.4):

result = apr_file_open(
    &file, // new file handle
    pathname, // file name          
    APR_FOPEN_CREATE | // create file if not there 
    APR_FOPEN_EXCL | // error if file was there already
    APR_FOPEN_APPEND | // move to end of file on open
    APR_FOPEN_BINARY | // binary mode (ignored on UNIX)
    APR_FOPEN_XTHREAD | // allow multiple threads to use file
    0, // flags
    APR_OS_DEFAULT |
    0, // permissions
    pool // memory pool to use
);

if ( APR_SUCCESS != result ) {
    fprintf(
        stderr,
        "could not create file \"%s\": %s",
        pathname,
        apr_errorstr( result )
    );
}

and pathname contains the string /tmp/tempfile20110614091201.

I keep getting the error “Permission denied” (result code APR_EACCES) but I have permissions to read/write to /tmp – what could be causing this?

  • 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-23T04:03:42+00:00Added an answer on May 23, 2026 at 4:03 am

    I needed the APR_FOPEN_WRITE flag. I had mistakenly assumed the APR_FOPEN_APPEND flag was enough.

    So, the call that worked was:

    
        result = apr_file_open(
            &file, // new file handle
            pathname, // file name          
            APR_FOPEN_CREATE | // create file if not there 
            APR_FOPEN_EXCL | // error if file was there already
            APR_FOPEN_WRITE | // open for writing
            APR_FOPEN_APPEND | // move to end of file on open
            APR_FOPEN_BINARY | // binary mode (ignored on UNIX)
            APR_FOPEN_XTHREAD | // allow multiple threads to use file
            0, // flags
            APR_OS_DEFAULT |
            0, // permissions
            pool // memory pool to use
        );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was making the following call: result = RegOpenKeyEx(key, s, 0, KEY_READ, &key); (C++,
I am making an AJAX call and I get the following: {status:Results Found,errorcode:0,result:[{name:test,id:1},{name:some,id:2}]} What
I am making the following call in my web page: <div id=comments> <fieldset> <h4>
General Python Question I'm importing a Python library (call it animals.py) with the following
I am making the following call in my blackberry application (API ver 4.5)... public
I'm making FQL calls using the following url and then making a curl call.
I'm looking at the following reference for making asynchronous web requests with C#: http://msdn.microsoft.com/en-us/library/86wf6409%28v=vs.100%29.aspx
I keep getting the following exception with a new resource Im making and i
I am making the following ajax call: $.ajax({ type: type, url: url, data: data,
I'm making a ajax call using jQuery I'm making use of the following options

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.