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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:49:09+00:00 2026-05-22T18:49:09+00:00

I am currently trying to configure collective.xsendfile, Apache mod_xsendfile and Plone 4. Apparently the

  • 0

I am currently trying to configure collective.xsendfile, Apache mod_xsendfile and Plone 4.

Apparently the Apache process does not see blobstrage files on the file system because they contain permissions:

ls -lh var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x18/0xd5/0x19/0x038ea09d0eddc611.blob
-r——– 1 plone plone 1006K May 28 15:30 var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x18/0xd5/0x19/0x038ea09d0eddc611.blob

How do I configure blobstorage to give additional permissions, so that Apache could access these files?

  • 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-22T18:49:09+00:00Added an answer on May 22, 2026 at 6:49 pm

    The modes with which the blobstorage writes it’s directories and files is hardcoded in ZODB.blob. Specifically, the standard ZODB.blob.FileSystemHelper class creates secure directories (only readable and writable for the current user) by default.

    You could provide your own implementation of FileSystemHelper that would either make this configurable, or just sets the directory modes to 0750, and then patch ZODB.blob.BlobStorageMixin to use your class instead of the default:

    import os
    from ZODB import utils
    from ZODB.blob import FilesystemHelper, BlobStorageMixin
    from ZODB.blob import log, LAYOUT_MARKER
    
    class GroupReadableFilesystemHelper(FilesystemHelper):
        def create(self):
            if not os.path.exists(self.base_dir):
                os.makedirs(self.base_dir, 0750)
                log("Blob directory '%s' does not exist. "
                    "Created new directory." % self.base_dir)
            if not os.path.exists(self.temp_dir):
                os.makedirs(self.temp_dir, 0750)
                log("Blob temporary directory '%s' does not exist. "
                    "Created new directory." % self.temp_dir)
    
            if not os.path.exists(os.path.join(self.base_dir, LAYOUT_MARKER)):
                layout_marker = open(
                    os.path.join(self.base_dir, LAYOUT_MARKER), 'wb')
                layout_marker.write(self.layout_name)
            else:
                layout = open(os.path.join(self.base_dir, LAYOUT_MARKER), 'rb'
                              ).read().strip()
                if layout != self.layout_name:
                    raise ValueError(
                        "Directory layout `%s` selected for blob directory %s, but "
                        "marker found for layout `%s`" %
                        (self.layout_name, self.base_dir, layout))
    
        def isSecure(self, path):
            """Ensure that (POSIX) path mode bits are 0750."""
            return (os.stat(path).st_mode & 027) == 0
    
        def getPathForOID(self, oid, create=False):
            """Given an OID, return the path on the filesystem where
            the blob data relating to that OID is stored.
    
            If the create flag is given, the path is also created if it didn't
            exist already.
    
            """
            # OIDs are numbers and sometimes passed around as integers. For our
            # computations we rely on the 64-bit packed string representation.
            if isinstance(oid, int):
                oid = utils.p64(oid)
    
            path = self.layout.oid_to_path(oid)
            path = os.path.join(self.base_dir, path)
    
            if create and not os.path.exists(path):
                try:
                    os.makedirs(path, 0750)
                except OSError:
                    # We might have lost a race.  If so, the directory
                    # must exist now
                    assert os.path.exists(path)
            return path
    
    
    def _blob_init_groupread(self, blob_dir, layout='automatic'):
        self.fshelper = GroupReadableFilesystemHelper(blob_dir, layout)
        self.fshelper.create()
        self.fshelper.checkSecure()
        self.dirty_oids = []
    
    BlobStorageMixin._blob_init = _blob_init_groupread
    

    Quite a hand-full, you may want to make this a feature request for ZODB3 🙂

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

Sidebar

Related Questions

I'm currently trying to configure Subversion/Apache/Trac and I've run into an error that I
I'm trying to configure the FlaggedRevs extension to a Wiki based on MediaWiki (currently
I'm trying to configure some WCF stuff. Currently, I have a server which allows
I'm trying to configure a custom xcode template for building Apache 2.2 modules in
I am currently trying to configure a routing option in Symfony2 so /cms will
I'm trying to configure an Apache webserver to work the following way: if /specialdir/
Trying to configure Jenkins CI. Currently just running it from the .war (eventual intention
Is there a way to configure ivy not to download sources & license files
I'm currently trying to configure Visual Studio to automatically set up the appropriate configurations
I am currently trying to configure an ASP.net Web Application through Web.config, to host

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.