Introduction
This article aims to focus on providing the steps on how to change the ownership of a file or folder.
Procedure
Ownership changes must be completed on the command-line as the root user. As such, any ownership change must be handled with extreme caution, and it is best in most cases to avoid changing ownership of files unless it's necessary due to incorrect ownership. Please see:
Chown -R was ran on /, is there a way to fix this?
To change the ownership of a file, use the chown command. The first part of the username:username argument is the username corresponding to the UID of the user, and the second part is the group.
Examples
chown -v username:username /home/user/public_html/index.php
chown -v username:nobody /home/username/public_html
If you are unfamiliar with the command-line and the dangers of changing file ownerships, it would be best that you consult with a qualified systems administrator that would be able to make the change for you.
For a list of System Administration Services, feel free to reference our public services list:
System Administration Services
Please note, however, that cPanel cannot be held liable for any services performed by third-party providers.