Linux常见定义记录

Figure 4.10 umask

Mask bit

Meaning

0400

user-read

0200

user-write

0100

user-execute

0040

group-read

0020

group-write

0010

group-execute

0004

other-read

0002

other-write

0001

other-execute


$ umask                        first print the current file mode creation mask
002
$ umask -S                     print the symbolic form
u=rwx,g=rwx,o=rx
$ umask 027                    change the file mode creation mask
$ umask -S                     print the symbolic form
u=rwx,g=rx,o=

//=================================================//

Figure 4.11. The mode constants forchmod functions, from <sys/stat.h>

mode

Description

S_ISUID

set-user-ID on execution

S_ISGID

set-group-ID on execution

S_ISVTX

saved-text (sticky bit)

S_IRWXU

read, write, and execute by user (owner)

S_IRUSR

read by user (owner)

S_IWUSR

write by user (owner)

S_IXUSR

execute by user (owner)

S_IRWXG

read, write, and execute by group

S_IRGRP

read by group

S_IWGRP

write by group

S_IXGRP

execute by group

S_IRWXO

read, write, and execute by other (world)

S_IROTH

read by other (world)

S_IWOTH

write by other (world)

S_IXOTH

execute by other (world)


S_IRWXO的全称是什么呢?哦,是这样啊  set-group-ID or a set-user-ID ,一看就明白了

S:                set

I:                 ID

RWX:         read,write,execute

O:               other

设定other这个项的file permission ID  是read , write,   execute。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值