Bug 60758 - bad bug - QtEditor will overwrite read-only files without prompting
Summary: bad bug - QtEditor will overwrite read-only files without prompting
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: All editors (show other bugs)
Version: git master
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-04 20:15 UTC by Jon Smirl
Modified: 2007-02-23 21:17 UTC (History)
0 users

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 Jon Smirl 2003-07-04 20:15:49 UTC
Version:           CVS (using KDE KDE 3.1)
Installed from:    RedHat RPMs

I am using bitkeeper which is not integrated into Gideon. When I modify a file and save it Gideon is saving files marked read only without prompting. It writes the changes and leaves the file marked read-only. Gideon should not do this. I should get a dialog saying the file is marked read-only and the save should fail. I will then manually enter the bk check out command. I have the source control option in Gideon set to none.

This may be a side effect of running Gideon as root. Since I am debugging a root priv app I am forced to run Gideon at root priv. Another bug asks for the ability to run Gideon normal and the debugger as root.

And I thought I was going crazy when changes I made to my code kept disappearing.

I didn't check the other editor.
Comment 1 Jens Dagerbo 2003-11-03 19:27:16 UTC
Raising severity. This is pretty bad. (if correct, haven't tested it yet)

I'd like to know if it is limited to QEditor though.
Comment 2 Jon Smirl 2003-11-03 19:50:20 UTC
Same problem occurs with Kate part. 

The real problem here is inablility to debug root priv apps without also running Kdevelop as root priv. If 60165 had a solution this bug would not be a problem.

http://bugs.kde.org/show_bug.cgi?id=60165
Comment 3 Jon Smirl 2003-11-06 22:37:24 UTC
I believe the problem here is when kdevelop is running as root it can write files even if the are marked read-only. Maybe we need to stat them first and check for write permission?

-r--r--r--    1 jonsmirl jonsmirl    37126 Nov  6 16:32 radeon_driver.c
did a save
-r--r--r--    1 jonsmirl jonsmirl    37126 Nov  6 16:34 radeon_driver.c

vi does not have same problem when running as root
Comment 4 Jens Dagerbo 2003-11-06 22:58:48 UTC
vi looks to be the exception.

I just tried nano, mcedit, echo and rm. Neither makes as much as a beep when writing to a file I have no permission to whatsoever when I do it as root.

Seeing how apps in general never attempt to keep root from doing what root wants to do, I don't even think this is technically a bug anymore and am lowering it to a wish instead.

QEditor does not overwrite readonly files if not run as root.

I think the energy would be best spent solving the real issue (bug 60165).
Comment 5 Andreas Pakulat 2007-02-23 21:17:44 UTC
We don't use QEditor anymore.