On Wed, 27 Aug 2003 15:16:47 -0400
Mark Hounschell
Ok let me clearify exactly what to do to see this "anomaly"
In your home directory, as you (markh) create a file.
touch /home/markh/xx
then: ls -al /home/markh/xx -rw-r--r-- 1 markh users 0 2003-08-27 12:23 /home/markh/xx Ok the file is owned by me...
Fine so far.
then as root: chown root /home/markh/xx chgrp root /home/markh/xx then ^d to leave root
Ok but you are doing this as root. Root can alter anyone's files.
then ls -al /home/markh/xx -rw-r--r-- 1 root root 0 2003-08-27 12:23 /home/markh/xx
Ok the file is now owned by root no?
Yep. Everything is the same on my machine.
Now as user (markh) use vi to edit the file. enter some text and write it back. You will have to use :w! command. The write should fail but does not.
This is where my machine differs. My file is now owned by root:root, and if I open it with vi as user zentara:user, vi says it is opened "readonly". "zz" [readonly] 0L, 0C The only thing I can think is happening is that you may still be in the root shell when you start vi. I would be very unhappy if my system did what your's is doing. I can see why you are baffled. I'm using fvwm2, maybe some others can test your procedure, but I'm afraid they will get the same results as me. Something has got to be wrong in your system. I would guess that markh is in the /etc/sudoers listed as root for vi. -- I'm not really a human, but I play one on earth.