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 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
5月前
|
Unix Shell Linux
Perceiving Permissions(√)
Perceiving Permissions(√)
43 0
|
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
2270 1
解决 windows:An attempt was made to access a socket in a way forbidden by its access permissions
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2
4475 0
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
723 0
docker: denied: requested access to the resource is deniedunauthorized: authentication required
SVN:Unreadable path encountered; access denied
SVN:Unreadable path encountered; access denied
231 0
SVN:Unreadable path encountered; access denied
|
分布式计算 MaxCompute Java
ODPS-0420095: Access Denied
最近想用阿里的MaxCompute,然后我自己写了一个mr程序,用MaxCompute Studio中的一键发布"Deploy to server"后,用客户端去执行jar,抛出了Access Denied的异常,请问是我没有开通MaxCompute的缘故吗?(目前申请使用的MaxCompute是开发版),还是我配置的问题?Exception in thread "main" com.
2731 0
|
开发工具
You need permission to perform this action access denied解决
这个界面,都遇到过吧。 解决办法一般是重获文件夹的OWNER权利。 但如何N多子文件夹,一个一个设置就头大了。 还有好有小工具。 http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/ 注册表之后,就可以右键得到子文件夹下的所有OWNER了。
1967 0
You need permission to perform this action access denied解决
|
.NET API Apache
[认证授权] 6.Permission Based Access Control
在前面5篇博客中介绍了OAuth2和OIDC(OpenId Connect),其作用是授权和认证。那么当我们得到OAuth2的Access Token或者OIDC的Id Token之后,我们的资源服务如何来验证这些token是否有权限来执行对资源的某一项操作呢?比如我有一个API,/books,它具...
1295 0