# Vi edit error : Read-only file, not written; use ! to override



## mfaridi (Apr 20, 2010)

sometimes I use Vi for edit some files like devcot.conf and apache.conf , after edit I when I type

```
:wq
```
I see this error


```
Read-only file, not written; use ! to override
```

, but with mcedit I can edit this file without error


----------



## SirDice (Apr 20, 2010)

mcedit ignores the permissions. Vi nicely warns you about it. You can always override it with *:w!*.


----------



## mfaridi (Apr 20, 2010)

SirDice said:
			
		

> mcedit ignores the permissions. Vi nicely warns you about it. You can always override it with *:w!*.



but I edit it with root user


----------



## SirDice (Apr 20, 2010)

mfaridi said:
			
		

> but I edit it with root user



That's why you are able to override it.


----------

