linxu下的文件属性为0755,022各是什么意思?

disremember 2006-11-29 07:08:59
初学linux,请多指教
linxu下的文件属性为0755,022各是什么意思?
...全文
1195 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
thefirstwind 2006-12-21
  • 打赏
  • 举报
回复
--- -> 0 (no excute , no write ,no read)
--x -> 1 excute, (no write, no read)
-w- -> 2 write
-wx -> 3 write, excute
r-- -> 4 read
r-x -> 5 read, excute
rw- -> 6 read, write ,
rwx -> 7 read, write , excute
geopower 2006-12-07
  • 打赏
  • 举报
回复
补充一下

你还可以增加增强的权限chmod +t 文件夹名

这样用户只能删除属于自己的文件,不能删除属于他人的文件
leafchu 2006-12-05
  • 打赏
  • 举报
回复
022是umask 也就是系统的默认文件建立后的权限 设置为022的话 出来的文件权限就是644
目录文件权限是755


??出来的文件权限就是644,是这样的阿?我还以为文件的权限也是755呢
disremember 2006-12-05
  • 打赏
  • 举报
回复
to thefirstwind:

you writed 0-6 ,but not writed 7 , that is the number 7 ?

am working in linux operation System, no chinses type, so i say english only, but my english is very poor,
so sorry!
disremember 2006-12-04
  • 打赏
  • 举报
回复
是不是:
第一个数字代表文件所有者权限?
第二个数字代表组成员权限?
第三个数字表其他用户权限?

那么设置成文件所有者 读/写/执行,即:7
组用户设置成可 读/执行,即:5
其他用户设置成可 读/执行, 即:5

于是就成了755 ?
是这样理解吗?
thefirstwind 2006-12-04
  • 打赏
  • 举报
回复
OK、good.
thefirstwind 2006-12-02
  • 打赏
  • 举报
回复
to disremember 8进制应该学过吧,上面我说的就是这个。仔细看看。
RHCE_Future 2006-12-02
  • 打赏
  • 举报
回复
775是文件权限 4是读 2是写 1是执行 0说明没有粘滞位(好象是吧 忘掉了说)
022是umask 也就是系统的默认文件建立后的权限 设置为022的话 出来的文件权限就是644
目录文件权限是755
注意:目录必须有执行权限 否则无法访问和打开! 所以不一样!
disremember 2006-12-02
  • 打赏
  • 举报
回复
我已经明白了0755的意思了,谢谢MYgroud和其他几位,
但是我根本不明白为什么是这样,那么0755中这样的权限是根据什么计算出来呢,
哪位有unit下的文件权限的资料给我个地址也行,谢谢!
thefirstwind 2006-11-30
  • 打赏
  • 举报
回复
[kei@lx55 kei]$ ll 00.sshlx95.sh

-rwxr-xr-x 1 kei pcad 22 11月 17 10:28 00.sshlx95.sh


[kei@lx55 kei]$ chmod 755 00.sshlx95.sh

[kei@lx55 kei]$ ll 00.sshlx95.sh

-rwxr-xr-x 1 kei pcad 22 11月 17 10:28 00.sshlx95.sh


[kei@lx55 kei]$ chmod 222 00.sshlx95.sh

[kei@lx55 kei]$ ll 00.sshlx95.sh

--w--w--w- 1 kei pcad 22 11月 17 10:28 00.sshlx95.sh
thefirstwind 2006-11-30
  • 打赏
  • 举报
回复
000 -> 0
001 -> 1
010 -> 2
011 -> 3
100 -> 4
101 -> 5
110 -> 6
111 -> 7
-------------------------------------
x is able to excute
w is able to write
r is able to read

--- -> 0 (no excute , no write ,no read)
--x -> 1 excute, (no write, no read)
-w- -> 2 write
-wx -> 3 write, excute
r-- -> 4 read
r-x -> 5 read, excute
rw- -> 6 read, write , excute

-------------------------------------

[kei@lx55 kei]$ ls -l
合計 88
-rwxr-xr-x 1 kei pcad 22 11月 17 10:28 00.sshlx95.sh
drwxr-xr-x 3 kei pcad 4096 11月 28 09:31 02.makefiles
drwxr-xr-x 2 kei pcad 4096 11月 28 09:34 03.bash
-rw-r--r-- 1 kei pcad 20307 11月 29 16:34 hiki_util.bupinbiao.pl



for example :
-(rwx)(r-x)(r-x) 1 kei pcad 22 11月 17 10:28 00.sshlx95.sh
( 1 )( 2 )( 3 ) owner group filename

-> (1):the owner (2):the owner's group (3):the others
now
the owner : read,write,excute
the owner's group : read, no write, excute
the others : read , no write , excute






MYgroup 2006-11-30
  • 打赏
  • 举报
回复
是权限  755是默认权限  root用户有读写执行权限  root组用户有读执行权限 
 其他用户有读执行权限  
022 是反码  文件夹用777(满权限)-022=755 要是文件就用666-022=644
  这好象在apache里有这个
lk_517 2006-11-29
  • 打赏
  • 举报
回复
7-wrx
6-rw
5-rx
4-r
3-wx
2-w
1-x
xsfh66 2006-11-29
  • 打赏
  • 举报
回复
4-读
2-写
1-执行
举例
ABCD
B-用户
C-组用户
D-其他用户
A-忘了

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧