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 permissions (u)

r: read
w: write
x: execute
Group permissions (g)Other permissions (o)
drwxr-xr-xrootrootabc
File type and permissionsOwnerGroupFile (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 you want to add read permission for the abc user

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 you want to change the student directory to the following permissions

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.