From the course: LPI Linux Essentials (010-160) Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Setting ownership demonstration

Setting ownership demonstration - Linux Tutorial

From the course: LPI Linux Essentials (010-160) Cert Prep

Setting ownership demonstration

- In this lesson, we're going to work on changing ownership of files and directories. You can see here on the screen, I've created a folder named ownership within my home directory underneath my documents directory. Now, in here I have three things. I have two text files, named foo1 and foo2, and one directory named foodlr. Now, if I do an ls - la, we can see who owns these files and who owns these directories. And as you can see here, it's owned by diontraining. But, what if I don't want to own these files anymore? What if I need to change this? So that Tim, that user we created recently, can now take ownership of foo1? Well, we can do that using a command known as chown, which is change ownership. Let's take a look at chown here. If we look at chown, it's going to change the file owner and the group. If you go through this, it will give you all the details of how to do it. So if we want to change the…

Contents