CDEvents icon indicating copy to clipboard operation
CDEvents copied to clipboard

Sandbox or CDEvents issue? Parent directories denied access.

Open stephenlind opened this issue 10 years ago • 2 comments

First of all, let me commend you on functional, well-packaged and documented code!

I'm considering using CDEvents to monitor directories in a sandboxed app. This seems to work well, provided that you access the correct type of security scoped urls.

However, when the app accesses a directory, the parent directories seem to fire off some access request, which is denied by the sandbox. This doesn't seem to break anything I care about, but it is worrisome to see such logging in the console:

The security-scoped url I am accessing and watching with CDEvents is /Users/steve/Desktop/myFolder.

When I begin the even stream in CDEvents, these lines are logged to the console:

7/10/14 3:29:04.000 PM kernel[0]: Sandbox: Draft Control(67135) deny file-read-data /Users/steve/Desktop 7/10/14 3:29:04.000 PM kernel[0]: Sandbox: Draft Control(67135) deny file-read-data /Users/steve 7/10/14 3:29:04.000 PM kernel[0]: Sandbox: Draft Control(67135) deny file-read-data /Users

The key here is that these parent folders are not being watched and CDEvents should not be attempting to access them.

I haven't looked into the CDEvents code yet, but will do so to try to find the issue.

stephenlind avatar Jul 11 '14 17:07 stephenlind

That’s interesting and indeed a worrisome. If you find the issue (and it’s with CDEvents) a pull request will be greatly appreciated!

I’ll try to look into it in the coming week as well unless you’re able to find the cause.

(Thanks by the way :smiley:)

rastersize avatar Jul 13 '14 14:07 rastersize

I'm noticing the exact same problem. Did either of you figure anything out?

digitalmoksha avatar Feb 06 '17 22:02 digitalmoksha