How to Change Ownership of a Folder (Ubuntu & CentOS 7.9)

 How to Change Ownership of a Folder (Ubuntu & CentOS 7.9)


To change the ownership of a folder and all its contents:


sudo chown -R [new_owner]:[new_group] /path/to/directory


Example:

sudo chown -R apache:apache /var/www/html


This command works the same on both Ubuntu and CentOS 7.9.





⚠️ Disclaimer:

For educational use only. Use at your own risk. We are not responsible for any issues or misuse. Apply under professional supervision.

Popular posts from this blog

How to Lock a Folder Without Any Third-Party Software (Using a Simple Script)

How to send & forward messages more than 5 people in Whats app

Project 01: Configure Small Network & CCTV Using Class C IP – Hotel Setup Guide