linux foundation - basic rights UGO

Object Permissions

U: Owner
G: is a group
O: others
of U + G + O and the three rights: A

Type of authority


r: Read. 4
W: Write 2
X: performing a

Setting permissions

数字更改
	chmod     数字     文件地址
字符更改
	chmod    (u/g/o/)(-/+/=)(r/w/x)      文件地址

Change owner / group of the genus
Here Insert Picture Description

chown命令
	设置文件的属主chown     
	 属主.属组    文件地址
		chown    -R       更改文件夹里面的所有的属主/属组
		ls   -d                查看目录的权限


示例
[root@localhost ~]# chown alice.hr file1 //改属主、属组
[root@localhost  ~]# chown alice file1 //只改属主
[root@localhost ~]# chown .hr file1 //只改属组
Released two original articles · won praise 10 · views 125

Guess you like

Origin blog.csdn.net/m0_46393435/article/details/104494827