码迷,mamicode.com
首页 > 系统相关 > 详细

Linux chmod

时间:2020-06-16 18:52:03      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:pre   rac   linux   ssi   others   --   rect   really   and   

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

标签:pre   rac   linux   ssi   others   --   rect   really   and   

原文地址:https://www.cnblogs.com/nedrain/p/13143166.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!