Re: How to edit a read-only file
- From: "Peter T. Breuer" <ptb@xxxxxxxxxxxxxxx>
- Date: Tue, 3 Jan 2006 23:25:36 +0100
Jay <jasonanderson042@xxxxxxxxxxxxxxxxxx> wrote:
> I'm trying to boot the latest debian on an acer travelmate laptop. When booting,
> it hangs at hw_random. From google-grouping, a suggestion to add "hw_random" to
> /etx/hotplug/blacklist looks promising so I booted a Knoppix 4 and tried to edit
> that file. I'm just a beginner and can't get by an error dialog "The document
> could not be saved..... Check that you write access to this file or that enough
> disk space is available.
Well, do so. Tell us what the state is.
> I've done right click on desktop icon to add write permissions to the drive.
Eh? "Right click"? What's that? You're not using a mouse and gui, are
you?
> I've also spent time working chmod and chown from a console within root and
> within the directory.
And?
> I managed to save a copy of the file to the desktop so I
> can save items, I just can't edit and save the file at it's appropriate location
> so that the boot can be re-tested.
Why not? Is the partition mounted read only? Or is the FS fubarred? Or
are you not root?
> Owner has read and write access to that text file. How can I become owner?
I don't understand what you mean - any way you like, but why should
you? You are root, no? What have the perms to do with anything? Why
do you think they have anything to do with it?
It seems to me you are woefully confused. Answer these qwuestions:
1) are you working as root?
2) is the FS mounted read-write?
3) is the FS full?
4) is the FS damaged?
5) is the file protected by chattr +i?
If you are working as root (1), the fs is mounted readwrite (2), and
you cannot delete and recreate the file, then the fs is (4) damaged or
(3) full or the file is protected by chattr (5). So tell us which it
is.
And please unconfuse yourself!
If I were you I would run
sudo mount -wno remount /themnt
sudo cp foo /themnt/etc/bar
And tell us about it. You might like to try before that
sudo umount /themnt && sudo fsck -y /dev/hdaWhatever
sudo mount -w /dev/hdaWhatever /themnt
And please do not use a gui - work from a prompt. You need to see what
you are doing, not some gui's febrile imagination.
Peter
.
- Follow-Ups:
- Re: How to edit a read-only file
- From: Jay
- Re: How to edit a read-only file
- From: Michael Heiming
- Re: How to edit a read-only file
- References:
- How to edit a read-only file
- From: Jay
- How to edit a read-only file
- Prev by Date: Re: How to edit a read-only file
- Next by Date: Re: How to edit a read-only file
- Previous by thread: Re: How to edit a read-only file
- Next by thread: Re: How to edit a read-only file
- Index(es):
Relevant Pages
|