Bug 52070 - File permissions ignored when run as root
Summary: File permissions ignored when run as root
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-18 15:24 UTC by Bill Davenport
Modified: 2003-03-13 22:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Davenport 2002-12-18 15:24:10 UTC
Version:           Gideon version Alpha 2 (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 
OS:          Linux

When looged in as root I've discovered that I can edit files marked read-only without any warnings. Ideally, I should be able to open a read-only file and modify it within the editor, and then save as a new file, but attempts to overwrite the read-only version should result in an error dialog box, or otherwise ask for confirmation before overwritting the file.

This is particularly important if the file being modified is under the control of a source control system that only checks files marked writeable as potentially being changed as part of its file checkin process.
Comment 1 Caleb Tennis 2002-12-18 16:40:53 UTC
This seems somewhat strange to me, though it's just my opinion.  Do other unix editors 
provide this functionality?  If I was logged in as a root, I would think I should be able to edit 
any file regardless of the permissions without warning.  The idea here being that you 
shouldn't be doing this project editing as root - and if you are its because you need to 
override ownership/group permissions. 
 
 
Comment 2 Bill Davenport 2002-12-18 16:58:53 UTC
Certainly if I use vi (perhaps not the greatest example) I have to use :w! to 
write out a read-only file I've chosen to edit. If I use emacs I also have to 
take additional actions to edit a read-only file.

On the other hand, I just tried out all of the gui editors on my RedHat 8.0 
system and none of them even notice the file is read-only, or otherwise stop me 
from editting the file, so kdevelop doesn't behave any different from the other 
apps in this regard.

I generally do all of my software editting as root, simply because it's easier 
overall to not worry about being able to build and install a kernel or app I'm 
working on. This clearly isn't a problem if I just change my habits to not use 
root except for the limited times I truely need the privs...

Bill
Comment 3 Caleb Tennis 2002-12-18 19:13:22 UTC
Okay, let's reassign this to the Kate folks and see what they think about it.   
Comment 4 Christoph Cullmann 2003-03-13 22:45:18 UTC
I think if you are root, you want no warnings, and the warning msg would be
misleading as you CAN write to the file, the permission doesn't interest
will close that bug as WONTFIX, if any complains please reopen