Chown is the Linux tool to change ownership of a file or directory. The general chown user group filename syntax is all that is needed..

$ sudo su
# cd /var/mail
# for x in *
# do
# chown $x $x
# done
# exit

can fix a mail system that has ownership problems


generally most cases do not need to change file ownership, changing permissions is adequate