- Log in to your SSH with root.
- Move inside the directory where you want to perform the changes by using the cd path/to/directory command.
- Now use the ls -all command to view the user & group of every file/directory.
- Use the chown user:group DirectoryName command as:
# chown USER FILE
- You can also change the owner permission of multiple files at once.
# chown RSH File1 Directory1
The above command will change the ownership of a file named File1 and directory named Directory1 to a new owner named RSH.
To read more about ownership permission in Linux, check the blog.