Do i need Administrator privileges to Monitor files in Mac using FSEvents

陌路散爱 提交于 2020-01-06 14:59:13

问题


I'm trying to get the File System Event notifications in Mac for my Application. When i was googling about FSEvents, noticed Dropbox is also using FSEvents and it's asking for administrator privileges to run "dbfseventsd" process. Do i also need to have Administrator privileges for my Application to monitor changes in a Directory ..?


回答1:


From apple's Documentation

File System Permissions and File System Events

The most obvious security concern related to file system events is one of privacy. If Bob can see a list of events from changes to Alice’s home directory, Bob might see things that Alice does not want him to see. For example, Alice might have a directory name that coincides with the code name of an unreleased Apple product.

To prevent this potential security leak, users do not receive any events unless the user can reach the modified directory through standard file system permissions.

Note: As a side effect, event IDs presented to a file system events client will not necessarily be consecutive even if the user is monitoring all events on all directories beginning at the root. Only applications running as the root user can be guaranteed to receive all events.



来源:https://stackoverflow.com/questions/12404510/do-i-need-administrator-privileges-to-monitor-files-in-mac-using-fsevents

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!