18.4. Access Permissions

简介:

18.4.1. chown - change file owner and group

chown - change file owner and group

[root@test ~]# touch test
[root@test ~]# adduser neo
[root@test ~]# chown neo test
[root@test ~]# ll test
-rw-r--r-- 1 neo root 0 Apr 19 18:15 test
			

18.4.2. chgrp - change group ownership

chgrp - change group ownership

# chgrp daemon -R *

# ll
drwxrwxr-x  3 neo  daemon      4096 Apr 16 18:23 user 		
			

18.4.3. chmod - change file access permissions

option

u = user
g = group
o = other
a = all

r = 4
w = 2	
x = 1
			
[root@test ~]# ll test
-rwxr--r-- 1 neo root 0 Apr 19 18:15 test
[root@test ~]# chmod g=x test
[root@test ~]# ll test
-rwx--xr-- 1 neo root 0 Apr 19 18:15 test
[root@test ~]# chmod go+w test
[root@test ~]# ll test
-rwx-wxrw- 1 neo root 0 Apr 19 18:15 test
[root@test ~]# chmod u-wx test
[root@test ~]# ll test
-r---wxrw- 1 neo root 0 Apr 19 18:15 test
[root@test ~]# chmod u=rwx test
[root@test ~]# ll test
-rwx-wxrw- 1 neo root 0 Apr 19 18:15 test
[root@test ~]# chmod a=rwx test
[root@test ~]# ll test
-rwxrwxrwx 1 neo root 0 Apr 19 18:15 test
			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
Docker Windows 容器
解决 windows:An attempt was made to access a socket in a way forbidden by its access permissions
解决 windows:An attempt was made to access a socket in a way forbidden by its access permissions
1323 1
解决 windows:An attempt was made to access a socket in a way forbidden by its access permissions
|
开发工具 数据安全/隐私保护 git
git 报错:Support for password authentication was removed. Please use a personal access token instead.
git 报错:Support for password authentication was removed. Please use a personal access token instead.
341 0
git 报错:Support for password authentication was removed. Please use a personal access token instead.
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决
WampServer 3 访问403 Forbidden You don't have permission to access this resource 解决
|
存储 NoSQL Redis
docker: denied: requested access to the resource is deniedunauthorized: authentication required
docker: denied: requested access to the resource is deniedunauthorized: authentication required
468 0
docker: denied: requested access to the resource is deniedunauthorized: authentication required
SVN:Unreadable path encountered; access denied
SVN:Unreadable path encountered; access denied
184 0
SVN:Unreadable path encountered; access denied
|
.NET API Apache
[认证授权] 6.Permission Based Access Control
在前面5篇博客中介绍了OAuth2和OIDC(OpenId Connect),其作用是授权和认证。那么当我们得到OAuth2的Access Token或者OIDC的Id Token之后,我们的资源服务如何来验证这些token是否有权限来执行对资源的某一项操作呢?比如我有一个API,/books,它具...
1264 0