当前位置:   article > 正文

linux权限管理(chmod, chgrp, chown)

execute permission(chmod 7xx)
chgrp : change the group
chown: change the owner
chmod: change the permission

chgrp [-R] dirname/filename......

For example:
chgrp users install.log

chown [-R] username dirname/filename

For example:
chown root:root install.log

chmod [-R] xyz dirname/filename
r:4
w:2
x:1

For example:
chmod 777 ./bashrc

if you wanna change the permission of .bashrc to -rw-r--r--
chmod 644 .bashrc

u
g + r
chmod - w dirname / filename
o = x
a


For example:
let's change the permission of a file to -rwxr-xr-x
chmod u=rwx,go=rx .bashrc (note: there is not space in statement:u=rwx,go=rx)

For example:
If there is a filename , I don't know it's permission, and we just like it have write permission. we can use the next statement.

chmod a+w .bashrc
Let's canceling the execute permission:
chmod a-x .bashrc
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/873282
推荐阅读
相关标签
  

闽ICP备14008679号