My fstab is readonly, and I can't change it!
Can someone help? My /etc/fstab file is readonly, and there's seemingly nothing I can do to change it - chmod doesn't work, remounting doesn't work, rebooting doesn't work. When I edit in vi, it says:
"/etc/fstab" [readonly] 9L, 695C I can't replace it, either. I am working as a root (via su -). I'm running Fedora Core 6. Thanks. |
are you SURE that you are running as root? is there a # or a $ next to your command prompt?
|
Yep, sure I'm running as root. There's a # as my command prompt.
|
Have you tried using vim from a super user terminal or edit it from a super user file manager. That is, if you have those features, you should if you have KDE, Gnome is a strange area for me.
|
very strange.
is it possible that it is on a read only file system? if so you would need to remount that file system as read only. alternatively, i know this is very sub-ideal, but can you boot up to a live distro and edit it that way? |
All good ideas, but none of them worked. Using vim from a super-user terminal just gave me the same result (not being able to save the edited file). Using the super-user file manager gave me an "Access denied" message whenever I tried to change the fstab file (I noticed that the permissions are definitely set to read and write for the owner, who is root).
I remounted the filesystem as read-write, but to no avail. I'm not sure how to tell if the filesystem is read-only, so if you have info on that, I can check. And I don't know how to boot from a live distribution - further info would be useful. Thanks. |
Go here, pick the option you prefer and put it over top of Fedora to fix the problem. :p
|
Any chance the immutable flag is set?
chattr -i /etc/fstab |
Jonwatson, you are a god :)
I have no idea what the immutable flag is, but that was the problem. Thank you very much! |
Quote:
I've always found that if root cannot do something to a file, it is almost always one of two things: 1. The file system is mounted read only (which someone else mentioned in this thread), or 2. The immutable flag is set I must admit to having no idea why the immutable flag seems to get set now and again, but it does. |
All times are GMT -5. The time now is 02:18 AM. |