jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCLOUDS-1397) FileSystem provider createContainerInLocation can generate folder with invalid permissions
Date Fri, 23 Mar 2018 16:22:00 GMT
Berin Loritsch created JCLOUDS-1397:

             Summary: FileSystem provider createContainerInLocation can generate folder with
invalid permissions
                 Key: JCLOUDS-1397
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1397
             Project: jclouds
          Issue Type: Bug
          Components: jclouds-blobstore
    Affects Versions: 2.0.1
         Environment: Windows 7 Enterprise SP 1
Java 1.8.0_131
            Reporter: Berin Loritsch

I'm using Spring Boot to wrap calls to the blob store in a microservice.  I ran into a problem
on a Windows 7 box I was not expecting: the blob container name was initialized with a directory
that had no privileges.  With the following property, we ran into a disparity in how the
folders are created:
We have some code in our microservice to ensure the blob store container exists before we
attempt to put any blobs in it.  Our initialization code has the following snippet, which
should be enough:
if (!blobStore.containerExists(blobContainerName)) {
     blobStore.createContainerInLocation(null, blobContainerName);
The end result was that the parent folder described by {{jclouds.filesystem.basedir}} was
correct in that the permissions on the folder were the default as if you called {{File.mkdirs()}}
in a standard Java application (read, update, write, execute for the process's user).  However,
the folder with the container name had no permissions (all turned off).

The symptom we had was an Exception thrown by the Filesystem provider because the blob could
not be renamed from the UUID temp file name to the one in provided by the putBlob() call.
Other pertinent facts:
 * The machine is in an Enterprise environment where there are global policies in place for
the network.  This is probably a contributing factor since I did not run into this problem
on a Windows 10 Professional box in a more relaxed environment.
 * The workaround was to pre-create the directories with the {{File.mkdirs()}} call.

This message was sent by Atlassian JIRA

View raw message