[OpenIndiana-discuss] no force write by root user?

Rolf M. Dietze rmd at orbit.in-berlin.de
Sun Mar 10 14:58:45 UTC 2024


Quoting Bill Sommerfeld via openindiana-discuss  
<openindiana-discuss at openindiana.org>:

> On 3/9/24 16:31, Rolf M. Dietze wrote:
>> Hello,
>>
>> if the root user wants to write back a file not writable as set by
>> permissions a force write back (wq! in vi) does not work. Is that
>> behavior intended? Other OSes as for instance oracle solaris, FreeBSD,
>> Solaris 10 and so, allow a force write back
>>
>> /rmd
>
> I can't reproduce; there must be something else at play (like a  
> read-only mount or unusual acls).
>
> # touch /var/tmp/noway
> # chmod 444 /var/tmp/noway
> # cat /var/tmp/noway
> # vi /var/tmp/noway
>
> (I type "ifoo <ESC> :wq!)
>
> # cat /var/tmp/noway
> foo

well, tried this right away..
touch noway
chmod 444  noway
ls >> noway
    this worked so...

but leaving a vi-session with :wq! gives me:
"noway"
E504: "noway" is read-only (cannot override: "W" in 'cpoptions')
Press ENTER or type command to continue

some phooney vi* option I dont know might do the trick?
what does " "W" in 'cpoptions' " wants me to point out?


/rmd





More information about the openindiana-discuss mailing list