microsoft / Windows-classic-samples

This repo contains samples that demonstrate the API used in Windows classic desktop applications.
Other
5.1k stars 3.23k forks source link

CloudMirror / CFAPI / Can't get access to cloud data via system service. #245

Open Modin-ua opened 2 years ago

Modin-ua commented 2 years ago

Turned out app started in service session (0) despite system privileges can't trigger data hydration from the cloud. Although if data already pulled to sync root service app can read data without issues.

Exception discovered: if executable placed in %systemroot% it can trigger hydration.

Error client (service session) app receives: Access to the cloud file is denied. - 0x0000018B (395) in ProcessMonitor(sysinternals) it would be error 0xC000CF18 indicated in CreateFile.

Issue can be reproduced by pointing any service app to not yet hydrated file in sync root for reading.

Or this way:

Already discussed in Docs Q&A, directed to this issue tracker from there. https://docs.microsoft.com/en-us/answers/questions/892349/cfapi-allow-data-fetch-for-services.html

Thanks,

AliveDevil commented 1 year ago

Same issue here. Trying to create unit tests for CloudFiles with a Jenkins CI service account.

It's impossible to test now, as no callback is generated for file access from the sync provider process, and spawning a separate helper-process to perform file access to trigger callbacks fails with above issue.