走马观花——文件的特殊权限

本文介绍了Linux系统中文件权限的概念,包括setuid、setgid及sticky位的作用,并解释了如何使用chmod命令来设置这些特殊权限。此外,还探讨了自举(bootstrap)过程在编译器验证中的应用。

file-mode

setuid-setgid-sticky bit

可执行文件的执行时的两种权限  1.调用文件者的权限 2.文件拥有者的权限  , setuid和setgid可以将文件从权限1提升到权限2

sticky理解为防删除:   拥有x标志的文件权限 1.用户组对目录有删除文件和建立文件的权限  2.用户组对目录只有建立文件的权限,不能删除文件, sticky将用户的x权限限制为s就是从权限1到权限2切换

rwsrw-r– 表示有setuid标志

rwxrwsrw- 表示有setgid标志

rwxrw-rwt 表示有sticky标志

chmod -v u+s filename   4644

chmod -v g+s filename   (4+2)644

chmod -v o+t filename   (6+1)644

1777 -> 001(u g s)   111(u) 111(g) 111(a)

x+s -> s

s     -> S  (文件若无可执行权限则显示大写的S, 否则为小写的s,t和T也是相同的道理)


 

groupadd lfs

useradd -s /bin/bash -g lfs -m -k /dev/null lfs

passwd lfs

chown lfs /dir

1.cfdisk 手动进行分区

2.mkfs.ext3 mkfs -ext3  进行格式化

3.tune2fs -l /dev/sda1  查看分区的详细信息

mkfs.ext3 -b 4096 -i 4096 /dev/sda1     block为4096bytes   inode为每4096设置一个

tune2fs      -l <device> 查看文件系统信息  -c <count>  设置强制自检的挂载次数   -i <n day> 设置强制自检的间隔时间  -m <percentage> 保留块的百分比  -j 将ext2文件系统转换为ext3格式


 

关于make mrproper

Linux内核源码根目录下面的makefile中,有很清晰的解释:
help:
 @echo  'Cleaning targets:'
 @echo  '  clean    - Remove most generated files but keep the config and'
 @echo  '                    enough build support to build external modules'
 @echo  '  mrproper   - Remove all generated files + config + various backup files'

 @echo  '  distclean   - mrproper + remove editor backup and patch files'


 

 

make bootstrap  关于bootstrap

在计算机领域的含义:

 

The term also applies to the use of a {compiler} to compile itself. The usual process is to write an interpreter} for a language, L, in some other existing language. The compiler is then written in L and the interpreter is used to run it. This produces an {executable} for compiling programs in L from the source of the compiler in L. This technique is often used to verify the correctness of a compiler. It was first used in the {LISP} community.

 

简单的说,就是自己编译自己,来验证本身的正确性,主要针对编译器,解释性语言等领域.
另外,boot就是bootstrap的缩写。所以“自举”这个词还是很准确的传达了原词的意思的,呵呵。

      GCC的make bootstrap选项:

 

http://gcc.gnu.org/install/configure.html
通过–disable-bootstrap和–enable-bootstrap来禁止和使能bootstrap过程。GCC编译时的bootstrap过程属于第三步,即stage3,通过编译自身来验证编译过程的正确性。

 


 

 

 

 

转载于:https://www.cnblogs.com/zigui2012/archive/2012/05/26/2519251.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值