-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does this simple monitoring app result in a permission denied error on file event? #294
Comments
Running this on a different system (Ubuntu 20.04, bare metal, no-VM), seems to indicate a different OS error ("No space left on device"), which is odd - every non-snap volume listed by
|
See also #266 - are you sure that you aren't at the inotify cap ? |
Depending on the settings and applications you're running, as well as how big the folder is you want to watch, you may already reach a limit. |
Ah, I see - makes sense. I think you are right about that. It is a very large folder. |
Note that you can increase your limits (system and user wide). Look for |
Regarding your readme: You can use https://docs.rs/notify/5.0.0-pre.6/notify/poll/struct.PollWatcher.html instead to use a polling based watcher. |
Thanks! I added some notes for that. |
Not sure if this is more of a question or a bug, so I'll fill out the below.
System details
OS/Platform name and version:
NixOS:
"x86_64-linux"
Linux 5.4.50, NixOS, 20.09.1889.58f9c4c7d3a (Nightingale)
yes
yes
nix-env (Nix) 2.3.7
""
"nixos-20.09.1889.58f9c4c7d3a"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
Rust version (if building from source):
rustc --version
:Notify version (or commit hash if building from git):
If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one:
Filesystem type and options:
If you're running as a privileged user (root, System):
If you're running in a VM, details on the hypervisor:
What you did (as detailed as you can)
I wrote a small program (just starting it) to monitor files in a given directory. The relevant snippet:
What you expected
I expected the program to keep running - I don't know why there would be a permission denied error in this program, especially since there are no writes, and it is just looking at a folder in my home directory with these permissions:
What happened
After running the program and initiating a filesystem action in another terminal (
touch ~/workspace/foo.txt
), I received an error and the program exited:The text was updated successfully, but these errors were encountered: