[BlueOnyx:11857] Re: can't save php.ini

Chuck Tetlow chuck at tetlow.net
Fri Dec 21 16:39:09 -05 2012


---------- Original Message -----------
From: "Carl E. Hartung" <carlh04426 at gmail.com> 
To: blueonyx at mail.blueonyx.it 
Sent: Fri, 21 Dec 2012 16:24:51 -0500 
Subject: [BlueOnyx:11855] Re: can't save php.ini

> On Fri, 21 Dec 2012 16:15:38 -0500 
> "Rob Shambaugh" <rshambaugh at ci.winchester.va.us> wrote: 
> 
> > Well, I was using pico, but I just tried using vi and it says 
> > "Warning: Changing a readonly file" 
> > 
> > Hmmmm... 
> 
> If you're familiar with vi, you'll know you can override the read-only 
> flag by appending an exclamation mark to the command, e.g. 
> 
> ... this is the edited line; next is command to override, save and quit: 
> :wq!

Carl is right.  In VI, use ":wq!" to overwrite a read-only file.

But if you still get a error, check the file to be sure no one has set the immutable bit - which would prevent even root changing that file  Use the command "lsattr php.ini" while in that file's directory.  If there is a lower-case "i" in the list of attributes, the immutable bit is set and you can't change the file.  Change that bit with "chattr -i php.ini", and then try writing to that file.  It should work then.

But if you do find that bit set - someone did that to prevent you or the system from rewriting that file.  You may hose something up by changing the file.  Or you may need to set that bit back after your change - to prevent the system from changing that file.  Set that bit on with "chattr +i php.ini"

Chuck
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20121221/d0135103/attachment.html>


More information about the Blueonyx mailing list