banner
破影岚歌

破影岚歌的博客

bilibili
twitter
github

15. Permission Management in CentOS 7

Permission Management in CentOS7#

drwxr-xr-x root root abc
d/-/lrwxr-xr-x
Type

d: directory
-: file
l: symbolic link
Owner permission (u)

r: read
w: write
x: execute
Group permission (g)Other permission (o)
drwxr-xr-xrootrootabc
File type and permissionOwnerGroupFile (folder) name
logout		# Log out the current user

Two commands related to permissions:

  1. Change permission command: chmod
  2. Change owner/group: chown

For example:

Now there is a file with detailed information:

drwxr-xr-x root root student

Now we want to add read permission for the user abc

Since the user is neither the root user nor in the root group

So, look at the last group of permissions

chmod o+w student

Or change the owner and group

chown abc:root

Another example:

Now we want to change the student directory to the following permission

drwx------	abc abc student
# Modify permissions using binary method
rwx --- ---	
111 000 000
chmod 700 student
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.