chown -R user:group Directory/Path/Name
I can’t believe I don’t have any notes on how to change the user and group for a folder with one command. I’m writing these notes here so I can remember this time.
I had difficulty finding the solution because I didn’t make any previous notes from what I learned in the past.
Now, with these notes here, it will be easier to remember next time and hopefully help others and myself on how to change the ownership of a directory in Linux with a simple command using chown.
This command is also helpful because it recursively changes all the child files and subdirectories, saving a lot of time.