I'm trying to make my linux system secure.
So I'm considering if I can remove the w permission for all of binary files, such as
pwd etc. For now they are all
-rwxr-xr-x root root, can I remove
w for root as owner?
Executable files shouldn't need 'w' permission to run - that is the purpose of the 'x' permission.
But, I don't think what you're trying to do is going to work. If someone can gain root access to your system, then they will have the power to do anything, regardless of whether the file owner has 'w' permission or not. The root user always has 'rw' access to all files on the system.
There may be some things you can do to protect your data though: