From the course: Complete Guide to Linux Security: Protecting Your Linux Server Environment

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

chown and chgrp

chown and chgrp

- Let's talk about ownership. We're going to be working with the chown command and the CHGRP, or CH group command in Linux, and we're going to be hovering around Lab 30, and so if you want to follow along, it's Lab 30 within the repository called Ownership. And I'm going to be working at my Debian client and working with ownership of the files that we created in the previous sub lesson. So we're going to work with ownership basics, and also the chown and chgrp commands. And we talked about assigning permissions to files. We mentioned how they can be assigned to the user, the group, and the other entities. The question is, who or what is the owner of these files? Well, in Linux, the answer is twofold. There is user ownership and there's group ownership. So let's look at this file once again, if you go past the permissions, you'll see the username twice here. So I created the file as my user account, so I get ownership of the file. This is known as user ownership right here. This is…

Contents