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] [Commented] (JCLOUDS-1397) FileSystem provider createContainerInLocation can generate folder with invalid permissions
Date Sat, 24 Mar 2018 18:03:00 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16412710#comment-16412710

Berin Loritsch commented on JCLOUDS-1397:

I'd love to, my changes were in my code before calling BlobStore, and it was on a private
network where there are strict rules as to what comes out.

I haven't checked out the project, so I can't guarantee how quickly I can get it done.

> 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
>            Priority: Major
>              Labels: filesystem
> 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:
> {code:java}
> jclouds.filesystem.basedir=Z:\blob-store{code}
> 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:
> {code:java}
> if (!blobStore.containerExists(blobContainerName)) {
>      blobStore.createContainerInLocation(null, blobContainerName);
>  }{code}
> 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()
> ----
> 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