Question
How do I change ownership of a file or directory?
Answer
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, you 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
Warning: 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
Note: cPanel cannot be held liable for any services performed by third-party providers.
Comments
0 comments
Article is closed for comments.