Bug 126649 - vi /sys/bus/pci/drivers/*/new_id - PERMISSION DENIED (root)
Summary: vi /sys/bus/pci/drivers/*/new_id - PERMISSION DENIED (root)
Alias: None
Product: Fedora
Classification: Fedora
Component: vim   
(Show other bugs)
Version: 2
Hardware: i686 Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-06-24 09:55 UTC by Stephen Wallace
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-07-21 14:41:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Stephen Wallace 2004-06-24 09:55:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
Logged in as root. FC2, fully patched up to 24/6/04.

Not sure which component to log under. Doesn't appear to be shell or
filesys specific.

If I try to `vi /sys/bus/pci/drivers/AEC62xx IDE/new_id` I
get...Permission denied

[root@stephenw /]# ls -l /sys/bus/pci/drivers/"AEC62xx IDE"/new_id
--w-------  1 root root 4096 Jun 23 12:25 /sys/bus/pci/drivers/AEC62xx

I get the same error for any of the "new_id" files under the various
subdirectories of /sys/bus/pci/drivers.

Also also reproduced with the following;

root# touch /tmp/file ; chmod 0200 /tmp/file ; vi /tmp/file

vi screen opens with blank file, but Permission Denied written at base
of screen.

Tried running /bin/sh and /bin/csh with same results.

Kernel 2.6.6-1.435, ext3 root.

The issue is also present in Redhat 8 / ext3, but not Redhat ES 3.0. 

i.e. It works correctly in that release.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. vi any "new_id" file under the various subdirectories of

Actual Results:  vi screen opens with Permission Denied message at
base of screen.

Expected Results:  Should not have got Perm Denied message. Was logged
in as root.

Additional info:

Comment 1 Ed Bailey 2004-06-28 18:34:43 UTC
Personally, expecting a text editor (any text editor) to not complain
when there is no read access to the file to be edited seems rather
strange to me, but I'll leave the final judgement to people more
qualified to answer this... :-)

Comment 2 Karsten Hopp 2004-07-21 14:41:54 UTC
I agree with Ed. If you don't have read permissions, what do you 
expect the editor to do ?  
emacs opens a window with the message 'File is not readable', too. 

Comment 3 Stephen Wallace 2004-07-21 15:57:22 UTC
Hi. The reason I notice the problem was when I tried to back up my
system using Cactus Lonetar. The verification failed because of this
perm denied message. Presumably there will be other scripts /
applications that may get a bit confused when this "error" message is
thrown up unexpectedly?

I agree with what you're saying, but this is not consistent across
your releases. I don't believe that you get this perm denied issue as
reported on any other *nix flavour I've used
(Digital/SunOS/Solaris/SCO). The first you normally hear of a readonly
file is when you try to write to it.

Your call. Either it stays as is, and you change your other releases
to be consistent, or fix this one.



Note You need to log in before you can comment on or make changes to this bug.