Hi.

I'm using jclouds 2.0.0-SNAPSHOT and I'm encountering strange permission
problems using the Filesystem provider under Windows 7 (with UAC)
using JDK8.

I'm trying to put a blob in a container directory starting in the root
of a harddisk (not C: - which is even more "special").
My path is (D:) /tmp/storage/mycontainer/file

When I try to put the blob using:

            blobStore.createContainerInLocation(null, directory,
CreateContainerOptions.Builder.publicRead());
            etag = blobStore.putBlob(directory, fileBlob);

I'll get:

Caused by: java.io.IOException: Could not rename file
\tmp\storage\mycontainer\file-cb84907b-a601-4cff-b21e-9ee0f268b567 to
\tmp\storage\mycontainer\file
    at
org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl.putBlob(FilesystemStorageStrategyImpl.java:500)
~[filesystem-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
    at
org.jclouds.blobstore.config.LocalBlobStore.putBlob(LocalBlobStore.java:757)
~[jclouds-blobstore-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
    at
org.jclouds.blobstore.config.LocalBlobStore.putBlob(LocalBlobStore.java:522)
~[jclouds-blobstore-2.0.0-SNAPSHOT.jar:2.0.0-SNAPSHOT]
...

Looking at the directory, /tmp/storage/mycontainer exists, but it is
empty. Trying to create files in this directory via Windows Explorer,
works. But renaming this
file afterwards doesn't. It complains about missing Administrator rights
- which I have.

Looking at the mycontainer directory permissions, it looks strange.
Every group/user is set to "special" permission - all other permissions
are removed.
Looking at this "special" permission, only read permissions are set.
That explains, why rename isn't allowed here.
Changing _any_ permission, e.g. "taking ownership" and saving it, allows
renaming again.

After this manual change, jclouds operates without any errors for
further puttBlobs in this container.
I already deleted the directory, made a filesystem check and rebootet
the machine. Behavior stays the same. I also disabled my Antivirus 
solution - just in case.

Funny thing: changing the path from (D:) /tmp/... to the Windows temp
directory %TMP% (e.g.
C:\Users\<user>\AppData\Local\Temp\mycontainer\...) does not lead
to the exception above!

I know that jclouds is doing some Acl magic depending on the OS e.g.
getting the "Everyone" group from Windows and setting special
permissions to the container
and files. Maybe it's a Windows 7 specialty when not using the Windows
temp directory? Where are the ITs putting their stuff for testing? Are
there even Windows
related tests for the Filesystem storage provider ;)?

Any help is appreciated.

Thanks
Veit




Reply via email to