Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1397

FileSystem provider createContainerInLocation can generate folder with invalid permissions

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.1
    • None
    • jclouds-blobstore
    • Windows 7 Enterprise SP 1
      Java 1.8.0_131


      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 comment will be Viewable by All Users Viewable by All Users


            Unassigned Unassigned
            bloritsch Berin Loritsch




                Issue deployment