[
https://issues.apache.org/jira/browse/JCLOUDS-1423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gunther Wiest updated JCLOUDS-1423:
-----------------------------------
Description:
When using the filesystem provider on a localized RUSSIAN Windows system
putBlob consistenly throws a RuntimeException. The put operation does succeed,
however, meaning a viable workaround is to catch-and-ignore.
The cause of the Exception is a UserPrincipalNotFoundException which is thrown
in org.jclouds.filesystem.util.Utils while trying to resolve the Windows SID
'S-1-1-0' user group using UserPrincipalLookupService.lookupPrincipalByName.
The Russian translation for everyone is "Все", and the output fo the "whoami"
command will be in [https://de.wikipedia.org/wiki/Codepage_866] wich turns into
different characters, when read into a java string via "ProcessBuilder.start".
This is the reason why the "lookupPrincipalByName" fails.
was:
When using the filesystem provider on a localized Windows system putBlob
consistenly throws a RuntimeException. The put operation does succeed, however,
meaning a viable workaround is to catch-and-ignore.
The cause of the Exception is a UserPrincipalNotFoundException which is thrown
in org.jclouds.filesystem.util.Utils while trying to resolve the Windows
'Everyone' user group using UserPrincipalLookupService.lookupPrincipalByName.
Turns out the 'Everyone' group/user is only actually available on Windows
systems set to an English locale, whilst other locales will likely have
localized names for the group (tested on Norwegian Windows in which the
Everyone group is known as "Alle").
The only ubiquitous reference to any of the built-in groups or users on a
Windows system are the SIDs. For example, 'Everyone' is known as 'S-1-1-0'.
Unfortunately, the API exposed in java.nio.file doesn't accept SIDs for lookup,
meaning there is, as far as I can tell, no pure Java solution to resolving the
UserPrincipal without knowing the (localized) name.
> BlobStore.putBlob throws RuntimeException with filesystem provider on RUSSIAN
> localized Windows
> -----------------------------------------------------------------------------------------------
>
> Key: JCLOUDS-1423
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1423
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-blobstore
> Affects Versions: 2.0.2
> Environment: Microsoft Windows (tested on 7 and 10), Java 7 and 8.
> Reporter: Gunther Wiest
> Assignee: Zack Shoylev
> Priority: Minor
> Labels: filesystem, windows
> Fix For: 2.1.0, 2.0.1
>
>
> When using the filesystem provider on a localized RUSSIAN Windows system
> putBlob consistenly throws a RuntimeException. The put operation does
> succeed, however, meaning a viable workaround is to catch-and-ignore.
> The cause of the Exception is a UserPrincipalNotFoundException which is
> thrown in org.jclouds.filesystem.util.Utils while trying to resolve the
> Windows SID 'S-1-1-0' user group using
> UserPrincipalLookupService.lookupPrincipalByName.
>
> The Russian translation for everyone is "Все", and the output fo the "whoami"
> command will be in [https://de.wikipedia.org/wiki/Codepage_866] wich turns
> into different characters, when read into a java string via
> "ProcessBuilder.start". This is the reason why the "lookupPrincipalByName"
> fails.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)