Hi there. Here I’ve come again to share with you something. Today I’m going to share with you something about the file and folder permission. Here I’ve provided screenshot of every steps. So lets start.
How to set file and folder permission in Linux (CentOS/Red Hat)
We’ll create two user, and at first we’ll log in as u1 and create a file and after that we’ll try to access by logging in as u2. So lets try these steps.
At first create the two user named as user1 and user2.
After that we’ll create a group and add the two user in that group
See the group information by using “more /etc/group” command, you can see that, there is no user in this group.
So lets add user “u1” and “u2” in the group named tech
Now see the group information, there are two users.
Now lets log in as “u2”
Restart computer
Now create a new directory named “computer”
See the directory under “home”
See the directory by command
Add user containing the group to the directory under computer, and create a text file.
See the text file.
See the text file.
Now change the permission of the directory
loggin as new user.
Yes !! we’ve done it. We tried to view the file but, can’t able see that.
See the directory “computer” details.
After changing the directory permission.
So we’ve see that by changing permission we can be able to see or hide the information.
I think that some topics is not clear to you, how to set the access of the files. I’ll discuss it to the next post about the change mode command. As there is so many image in this post, then you can’t be able to see the post more clearly. Best of luck. Hope that you’ve enjoyed it.
Leave a Reply