linux permission 777

     周末编译个glibc 遇到permission问题 以前都是无脑777设置下去 今天有闲 简单研究一下

     777详解:
     命令:chmod permissions filename
     例子:chmod 777 glibc
     说明:三个7 第一个7是user权限,第二个7是group权限,第三个是other权限
     具体权限如下表:

Number Permission Type Symbol
0 No Permission ---
1 Execute --x
2 Write -w-
3 Execute + Write -wx
4 Read r--
5 Read + Execute r-x
6 Read +Write rw-
7 Read + Write +Execute rwx

     +777是咋回事:
     看起来‘加减’类似‘与或’的关系

Operator Description
+ Adds a permission to a file or directory
- Removes the permission
= Sets the permission and overrides the permissions set earlier.

   对整个目录所有文件修改权限:
   chmod -R 777 glibc
   或
   cd glibc
   chmod -R 777 *

发布了43 篇原创文章 · 获赞 2 · 访问量 3409

猜你喜欢

转载自blog.csdn.net/songpeng26/article/details/88623501
777