Linux 文件权限

linux用8位二进制来标识权限,三位一组。二进制应该是大学时代微机原理教的吧?
1-001 2-010 3-011 4-100 5-101 6-110 7-111
所以 chmod 777 文件名,就等于把所有权限给设置成1 了。
具体每一位权限什么意思,参见下表

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`

在Linux文件系统中 ls -l 文件名,我们可以看到

dell@GAME:/etc/apache2/mods-enabled$ ls -l wsgi.load 
-rwxrwxrwt 1 root root 56 May  3 13:50 wsgi.load

具体的意义可以在下表中查询到。

l = Link to another file

d = a directory

- = file

r = read permission - Read the file

w = write permission - Write or edit the file

x = execute permission He can execute the file

- = no permission
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值