Normally we know when we create one file in Linux, the file's owner and group will set with the creator. For example, I have one user,
usera, after I execute
I will find the owner of this file will be usera, just like
usera@srv1:$ll -rw-r--r-- 1 usera usera 0 2012-07-25 14:29 1.txt
But now the result is:
-rw-r--r-- 1 root usera 0 2012-07-25 14:29 1.txt
It seems that not only the touch command, but also others are all have the same problem. For example, if I use
vim to create a new file in usera's home, which means this user has permission to create file:
usera@srv1:$ vim a.txt
I can enter edit screen, but cannot save it. The error message is the same as we do not have write permission on that file.
So what happens on our server, the server is Ubuntu 11.04 64bits.
One extra but maybe useful information:
Now all new created users have similar problem.
usera is a
sudoer, but after I create a new normal user (
sudo createuser xxx), assign password and login with this new account, it's the same.