Bugzilla – Bug 104658
inotify: inconsistent permission handling
Last modified: 2005-09-05 19:34:32 UTC
With the beta1 kernel there is a regression: watching a directory and watching a single file is handled differently. While I can watch a directory, I can't watch a file contained in it. To reproduce this just change env.path to fn in access_setup() in the attached test program.
Created attachment 46038 [details] inotify01.c
Can you be more specific: What is the error? What are the permissions on the file versus the directory? Watching an individual file works fine, here. Can you post a self-contained test case?
Do you mean this: watch /tmp/foo fails watch /tmp succeeds then you can get an event on /tmp saying foo was modified?
Yah, I'd like to see the permissions on the file versus the directory. But we are going to have to live with comment #3's example, I think.
About #3: that's exactly what I was talking about. And I checked the permissions of the newly created file that I tried to watch, they were 0700. And I'll try to create a test program that doesn't need ltp.
#5: Don't worry about creating the test program, I definitely get the situation now. I think we are going to want to just live with that behavior, as the alternative is to check permissions on the parent directory when you open a file.
If everyone agrees, please close this as WONTFIX.
Hm, no comment means no objections.