How to change both the user and group ownership of folder and it's all subdirectories in Linux

To change both the user and group ownership of a folder and its subdirectories, you can use the chown command with the -R option. Here's the command:


sudo chown -R newuser:newgroup /path/to/folder

Replace newuser with the desired username and newgroup with the desired group name. This command will recursively change the user and group ownership of the specified folder and all its subdirectories.

Comments

Leave a Reply