Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chmod does not allow me to change mode

Status
Not open for further replies.

lifefromfeur

IS-IT--Management
Joined
Jan 19, 2006
Messages
1
Location
US
I am not able to edit the /etc/hosts file. IT says Read Only file system. But 'ls -l' shows me the right permissions. WHen I try 'chmod' it says WARNING can'r change ! I must be missing something very elementary here.

Any help is appreciated.
Thanks
-SM
 
Are you multi user? Typically upon boot with errors, it will only mount root readonly until the error is rectified (usually an fsck)

gene
 
By default, /etc/hosts is a soft link to the actual host file in /etc/inet/hosts. Use command "ls -aFl" on /etc/hosts to see if it is a soft link.
 
If you are root you can overide permissions: in vi even if it says the file is read only you can still save changes with the command :w!

The bang (!) forces a write.
 

The key here is read only FILESYSTEM. This still leads we to believe that the run level is wrong.

gene
 
Check your /etc/vfstab file settings for an ro in the options area. Also run the format command and look at the options of that partition. You could also try this to see what happens.

mount -o rw,remount /
 
I am pretty sure that root isn't mounted like other filesystems, so the vfstab(at least for rw/ro) is likely ignored. After all, everything must be mounted on something, but / can't be mounted on AIR!

gene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top