Question: how to change the owner for a directory in linux?
Answer: Use chown to change ownership and chmod to change rights. use the -R option to apply the rights for all files inside of a directory too. Note that both these commands just work for directories too. The -R option makes them also change the permissions for all files and directories inside of the directory.