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:
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.