Windows USN Journals #53

Open
nathany opened this Issue Nov 16, 2014 · 12 comments

Comments

Projects
None yet
5 participants
@nathany
Member

nathany commented Nov 16, 2014

@pkrnjevic mentioned Windows USN Journals here: fsnotify/fsevents#1 (comment)

"On Windows NT 4.0, these tasks were accomplished with functions like FindFirstChangeNotification and ReadDirectoryChangesW. Anyone who has attempted to use these functions knows how limited they can be. The Change Journal provides a new level of detailed information for applications that need to monitor changes on an NTFS volume."

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Nov 16, 2014

Member

Until now I hadn't heard of USN Journals. It sounds worth looking into.

Is this the state-of-the-art not in just Windows 2000, but also Windows 7, 8, 10?

We do have working code for Windows based on ReadDirectoryChangesW. It is based on winfsnotify and everyone who's contributed to it has agreed to the CLA.

But it does need a lot of love (see #6 and #21), and I'm certainly not opposed to doing a fresh implementation if there are APIs that can provide better reliability and closer feature parity to other operating systems.

Member

nathany commented Nov 16, 2014

Until now I hadn't heard of USN Journals. It sounds worth looking into.

Is this the state-of-the-art not in just Windows 2000, but also Windows 7, 8, 10?

We do have working code for Windows based on ReadDirectoryChangesW. It is based on winfsnotify and everyone who's contributed to it has agreed to the CLA.

But it does need a lot of love (see #6 and #21), and I'm certainly not opposed to doing a fresh implementation if there are APIs that can provide better reliability and closer feature parity to other operating systems.

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Nov 16, 2014

Member

FYI, Go currently requires Windows XP or later, so there is no need to support anything older than that.

Member

nathany commented Nov 16, 2014

FYI, Go currently requires Windows XP or later, so there is no need to support anything older than that.

@pkrnjevic

This comment has been minimized.

Show comment
Hide comment
@pkrnjevic

pkrnjevic Nov 17, 2014

For those interested, here is a small example of using Windows Journals I wrote in Go, based on the MSJ Windows Change Journal article and sample.
I can confirm this works with Windows 7 (32 bit) with Go 1.3.3. Must be run with Administrator privileges.

For those interested, here is a small example of using Windows Journals I wrote in Go, based on the MSJ Windows Change Journal article and sample.
I can confirm this works with Windows 7 (32 bit) with Go 1.3.3. Must be run with Administrator privileges.

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Nov 19, 2014

Member

Is it possible to use USN Journals without Administrator privileges?

Member

nathany commented Nov 19, 2014

Is it possible to use USN Journals without Administrator privileges?

@pkrnjevic

This comment has been minimized.

Show comment
Hide comment
@pkrnjevic

pkrnjevic Nov 19, 2014

Not that I know of.
My plan was to use it in a Windows service, with a user space client interface, though there are probably better ideas.

On Nov 19, 2014, at 12:14 AM, Nathan Youngman notifications@github.com wrote:

Is it possible to use USN Journals without Administrator privileges?


Reply to this email directly or view it on GitHub https://github.com/go-fsnotify/fsnotify/issues/53#issuecomment-63593356.

Not that I know of.
My plan was to use it in a Windows service, with a user space client interface, though there are probably better ideas.

On Nov 19, 2014, at 12:14 AM, Nathan Youngman notifications@github.com wrote:

Is it possible to use USN Journals without Administrator privileges?


Reply to this email directly or view it on GitHub https://github.com/go-fsnotify/fsnotify/issues/53#issuecomment-63593356.

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Nov 20, 2014

Member

That's a bit unfortunate.

Do you want me to create a Windows USN repo under go-fsnotify?

We could bring the code over and make sure everything still works in Go 1.3 & 1.4.

Member

nathany commented Nov 20, 2014

That's a bit unfortunate.

Do you want me to create a Windows USN repo under go-fsnotify?

We could bring the code over and make sure everything still works in Go 1.3 & 1.4.

@atimoschenkow

This comment has been minimized.

Show comment
Hide comment
@atimoschenkow

atimoschenkow May 3, 2015

Hi,

is anyone still working on this?

Hi,

is anyone still working on this?

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany May 13, 2015

Member

Nope. Nobody ever was.

Member

nathany commented May 13, 2015

Nope. Nobody ever was.

@nathany nathany added the help-wanted label May 13, 2015

@qloak

This comment has been minimized.

Show comment
Hide comment
@qloak

qloak Nov 14, 2015

Is anybody still working on this project? I have some interest on getting go to work with USN journal.

qloak commented Nov 14, 2015

Is anybody still working on this project? I have some interest on getting go to work with USN journal.

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Nov 17, 2015

Member

Hi. So far this issue has just been a place to collect information about USN. Nobody has begun implementing support for it is fsnotify.

To support USN directly in fsnotify, I think we'll need a driver system where people can choose between ReadDirectoryChangesW or USN much like choosing a MySQL or Postgres driver. To start, my suggestion would be to build up a stand-alone USN package and then we'll figure out how to integrate it.

That could be as a subfolder of this repository or a separate repository (I'm happy to create a repo under the go-fsnotify organization if desired).

There's also plenty of clean up work to do on the current Windows support.
https://github.com/go-fsnotify/fsnotify/labels/Windows%20%28ReadDirectoryChangesW%29

Thanks

Member

nathany commented Nov 17, 2015

Hi. So far this issue has just been a place to collect information about USN. Nobody has begun implementing support for it is fsnotify.

To support USN directly in fsnotify, I think we'll need a driver system where people can choose between ReadDirectoryChangesW or USN much like choosing a MySQL or Postgres driver. To start, my suggestion would be to build up a stand-alone USN package and then we'll figure out how to integrate it.

That could be as a subfolder of this repository or a separate repository (I'm happy to create a repo under the go-fsnotify organization if desired).

There's also plenty of clean up work to do on the current Windows support.
https://github.com/go-fsnotify/fsnotify/labels/Windows%20%28ReadDirectoryChangesW%29

Thanks

@elvarb

This comment has been minimized.

Show comment
Hide comment
@elvarb

elvarb May 17, 2016

Would love for this to get implemented, such a powerful feature.

Found this that could be of help.
https://blogs.technet.microsoft.com/heyscriptingguy/2015/08/12/use-poshusnjournal-module-to-work-with-change-journal/

elvarb commented May 17, 2016

Would love for this to get implemented, such a powerful feature.

Found this that could be of help.
https://blogs.technet.microsoft.com/heyscriptingguy/2015/08/12/use-poshusnjournal-module-to-work-with-change-journal/

@nathany

This comment has been minimized.

Show comment
Hide comment
@nathany

nathany Jun 28, 2016

Member

If someone is interested in implementing USN, we would probably start by getting it working outside of fsnotify (much like the fsevents package), and then look at bringing it in afterwards.

Let me know if you're interested.

Member

nathany commented Jun 28, 2016

If someone is interested in implementing USN, we would probably start by getting it working outside of fsnotify (much like the fsevents package), and then look at bringing it in afterwards.

Let me know if you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment