Bug 104658

Summary: inotify: inconsistent permission handling
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Gernot Payer <gpayer>
Component: KernelAssignee: Robert Love <rml>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: inotify01.c

Description Gernot Payer 2005-08-15 11:09:36 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.
Comment 1 Gernot Payer 2005-08-15 11:11:26 UTC
Created attachment 46038 [details]
inotify01.c
Comment 2 Robert Love 2005-08-15 16:17:59 UTC
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?
Comment 3 John Mccutchan 2005-08-15 16:38:39 UTC
Do you mean this:

watch /tmp/foo fails

watch /tmp succeeds

then you can get an event on /tmp saying foo was modified?
Comment 4 Robert Love 2005-08-15 17:03:31 UTC
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.
Comment 5 Gernot Payer 2005-08-16 08:58:49 UTC
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.
Comment 6 Robert Love 2005-08-16 14:36:00 UTC
#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.
Comment 7 Olaf Kirch 2005-09-01 11:24:19 UTC
If everyone agrees, please close this as WONTFIX. 
Comment 8 Olaf Kirch 2005-09-05 19:34:32 UTC
Hm, no comment means no objections.