Bug 104658 - inotify: inconsistent permission handling
Summary: inotify: inconsistent permission handling
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Beta 1
Hardware: Other All
: P5 - None : Normal
Target Milestone: ---
Assignee: Robert Love
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 11:09 UTC by Gernot Payer
Modified: 2005-09-05 19:34 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
inotify01.c (7.48 KB, text/plain)
2005-08-15 11:11 UTC, Gernot Payer
Details

Note You need to log in before you can comment on or make changes to this bug.
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.