Giter Site home page Giter Site logo

Comments (9)

passcod avatar passcod commented on August 25, 2024

@andelf, @octplane

from notify.

joelself avatar joelself commented on August 25, 2024

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 

from notify.

octplane avatar octplane commented on August 25, 2024

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.

joelself avatar joelself commented on August 25, 2024

I removed the special attribute and it didn't change anything (for either library).

from notify.

joelself avatar joelself commented on August 25, 2024

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.

octplane avatar octplane commented on August 25, 2024

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.

passcod avatar passcod commented on August 25, 2024

Sounds good. Can you draft something to that effect? I'll add it tonight.

from notify.

passcod avatar passcod commented on August 25, 2024

Done in #51, may also be able to be covered in #64.

from notify.

umanwizard avatar umanwizard commented on August 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.