Linux chmod

Posted nedrain

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux chmod相关的知识,希望对你有一定的参考价值。

the 10

drwxr-xr-x

the first bit:

- regular file
b block special file
c character special file
s socket
d directory
l link
p pipe

the other nine bits

User --- Group --- Others

chmod [parameter] [mode] [file]

// add  execute right to user 
chmod u+x a.file  //u means user, g means group, o means other , + means add, - means minus, = means assign

// add write right to group and others
chmod g+w, o+w a.file

//delete the execute right from user, delete write right from group and others
chmod u-x, g-w, o-w a.file 

use the digit in chmod

4 means r 2 means w 1 means x Ok, this is really important

chmod 744 a.file // rwxr--r--
chmod 755 a.file //rwxr-xr-x
// DON‘T USE 777, That‘s really silly.

以上是关于Linux chmod的主要内容,如果未能解决你的问题,请参考以下文章

如何在汇编 linux x86 中使用 chmod()?

在LInux操作系统中,命令“chmod

linux下chmod -x这个命令是有啥作用?

Linux文件权限,chmod

linux chmod命令详解

Linux文件/目录管理(中级)