Comments (9)
from notify.
There's definitely something to do with with the file type, the way it's modified or permissions. I'm trying to tail /var/log/system.log
. I can read it without elevating to root, but can't write to it without sudo. I tried another FSEvent library: https://github.com/octplane/fsevent-rust and it doesn't get notified when the file is appended, but if I do sudo touch /var/log/system.log
, it registers that event. I tried rsnotify again, but it doesn't pick up on the the touch
es so there's still something wrong.
The file apparently has extended attributes. If I do an ls -l@
I get:
-rw-r-----@ 1 root admin 1164847 Feb 1 16:00 system.log
com.apple.quarantine 32
from notify.
I'm away from OS X until next week so I won't be able to dig further but my wild guess is that FSEvent has probably some limitation around extended attributes files.
Note that rsnotify uses my library internally on OS X so the behavior difference is probably only a configuration detail. The actual issue should probably be sent upstream for further analysis (which would start by looking at stackoverflow opinion on the subject)...
Le 1 févr. 2016 à 17:02, Joel [email protected] a écrit :
There's definitely something to do with with the file type, the way it's modified or permissions. I'm trying to tail /var/log/system.log. I can read it without elevating to root, but can't write to it without sudo. I tried another FSEvent library: https://github.com/octplane/fsevent-rust and it doesn't get notified when the file is appended, but if I do sudo touch /var/log/system.log, it registers that event. I tried rsnotify again, but it doesn't pick up on the the touches so there's still something wrong.
The file apparently has extended attributes. If I do an ls -l@ I get:
-rw-r-----@ 1 root admin 1164847 Feb 1 16:00 system.log
com.apple.quarantine 32
—
Reply to this email directly or view it on GitHub.
from notify.
I removed the special attribute and it didn't change anything (for either library).
from notify.
I wouldn't take this as very high priority. I only cared about MacOS because I was developing on a Mac. My ultimate targets are Linux and Windows. I'm just going to develop in Linux from now on.
from notify.
After some investigation, It appears this is a (security) limitation of the FSEvent API. I suggest we close that, maybe add a note somewhere in the doc regarding the fact that the PollWatcher might work around this issue.
from notify.
Sounds good. Can you draft something to that effect? I'll add it tonight.
from notify.
Done in #51, may also be able to be covered in #64.
from notify.
I believe the analysis in this thread to be wrong. I do not think /var/log/system.log
is unreadable for security reasons; rather, I think the issue is that FSEvents only delivers file-modified events when a file handle is closed, and whatever daemon writes to that file is not closing it.
See the discussion in #240 .
from notify.
Related Issues (20)
- On FreeBSD notifications are only delivered using `RecursiveMode::Recursive`
- TOCTOU bug when adding a watcher HOT 1
- Watch on non-existing file HOT 3
- PollWatcher: Ignore IO "file not found" exceptions when accessing entry metadata?🥺 HOT 4
- .
- How to stop a debouncer watcher if it's mut reference?
- Compilation error in v4 HOT 4
- FS operations performed by blender yield confusing order of events from the debouncer HOT 5
- I have to specify all possible event kinds in match statement, instead of using any. HOT 2
- Using kqueue on mac can result in "Too many open files (os error 24)"
- Q. How to ignore tracking some folders/files inside tracked folder? HOT 2
- EXC_BAD_ACCESS the first time after running a freshly compiled binary
- v4 of Notify lacks `std` and `winerror` features of `winapi` HOT 1
- Request: publish notify-debouncer-full 0.4.0
- Include watched path in Event when watching multiple paths recursively HOT 1
- SQLite database changes are not reported correctly under macOS HOT 2
- Document `notify::event::EventAttributes::info`
- Bug: Crashes on Windows when the watched directory no longer exists in release mode HOT 1
- Open file with zero access mode read permissions in `file-id` crate
- Moving subdirectory of recursive watch does not include to and from paths for Modify Name event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notify.