<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<font size="2"><b>---------- Original Message 
-----------</b>
<br />
From: "Carl E. Hartung" <carlh04426@gmail.com> 

<br />
To: blueonyx@mail.blueonyx.it 

<br />
Sent: Fri, 21 Dec 2012 16:24:51 -0500 

<br />
Subject: [BlueOnyx:11855] Re: can't save php.ini 

<br />

<br />> On Fri, 21 Dec 2012 16:15:38 -0500 
<br />> 

"Rob Shambaugh" <rshambaugh@ci.winchester.va.us> wrote: 
<br />> 

<br />> 

> Well, I was using pico, but I just tried using vi and it says 
<br />> 

> "Warning: Changing a readonly file" 
<br />> 

>  
<br />> 

> Hmmmm... 
<br />> 
<br />> 

If you're familiar with vi, you'll know you can override the read-only 
<br />> 

flag by appending an exclamation mark to the command, e.g. 
<br />> 
<br />> 

... this is the edited line; next is command to override, save and quit: 

<br />> 

:wq! 
<br />
<br />
<br /><font size="2">Carl is<font size="2"> right.  In VI<font size="2">, u<font size="2">se ":wq!" to overwrite a read-<font size="2">only file.
<br />
<br /><font size="2"><font size="2">But if you s<font size="2">till get a error, check the file to be sure no one has set the immutable bit - which would prevent even <font size="2">root changing tha<font size="2">t file  Use the command "lsattr<font size="2"> php.ini" while in that file<font size="2">'s</font> directory<font size="2">.  If the<font size="2">re is a lower-case "i" in the <font size="2">list of attributes, the immutable bit <font size="2">is set and you can't change the file.  Change that bit with "chattr -i php.ini"<font size="2">, and then try writing to that file.  It should work then.
<br />
<br /><font size="2">But if you do fin<font size="2">d that bit set - someone did that to prevent you or the system from <font size="2">rewriting that file.  You may hose something up by changing the file.  Or you may need to set that bit back after your chan<font size="2">ge - to prevent the syst<font size="2">em from changing that file.  Set that bit on with "chattr <font size="2">+<font size="2">i php.ini"</font></font></font></font></font></font></font>
<br />
<br />
<br />
<br /><font size="2">Chuck</font>
<br /></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>

</font>

</BODY>
</HTML>