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

The Archive Base Latest Questions

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

I have a really large file I’m trying to open with mmap and its

  • 0

I have a really large file I’m trying to open with mmap and its giving me permission denied. I’ve tried different flags and modes to the os.open but its just not working for me.

What am I doing wrong?

>>> import os,mmap
>>> mfd = os.open('BigFile', 0)
>>> mfile = mmap.mmap(mfd, 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
mmap.error: [Errno 13] Permission denied
>>> 

(using the built in open() works via the python docs example, but it seems to open more than one handle to the file both in read & write mode. All i need for the mmap.mmap method is the file number, so I wouldn’t assume i need to create a file object; hence my attempt at using os.open())

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

    I think its a flags issue, try opening as read only:

    mfd = os.open('BigFile', os.O_RDONLY)
    

    and mmap.mmap by default tries to map read/write, so just map read only:

    mfile = mmap.mmap(mfd, 0, prot=mmap.PROT_READ)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have really large file with approximately 15 million entries. Each line in the
I have a large file in windows XP - its 38GB. (a VM image)
I have a really large excel file and i need to delete about 20,000
I have done database optimization for dbs upto 3GB size. Need a really large
In software companies I have seen it's really hard to work on very large
Given a really large, 3+ gig, binary file is there anyway that I could
Assuming i got really really large list of random numbers in a text file
We've got a problem when trying to generate and use a really large proxy
I'm using C# (.Net 2.0), and I have a fairly large text file (~1600
I have a number of really large files with many insert statements (18.7 million

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.