microsoft / microsoft/Windows-classic-samples

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

Open
#245 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

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:

  • Copy executable file C:\Windows\System32\more.com to C:\more.com

  • Run in elevated console: psexec -h -s cmd

  • Try open any file in local sync root like: C:\more.com C:\sync_root_folder\cloud_file
    get Cannot access file error.

  • Run: C:\WINDOWS\system32\more.com C:\sync_root_folder\cloud_file
    see it opens fine.

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,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the service-session behavior with the documented PsExec command and compare opening the same unhydrated sync-root file from C:\more.com and C:\Windows\System32\more.com. The issue provides no repository file, test, or requested code change; done would require an agreed explanation or fix for service access to cloud hydration.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.