linux文件权限含义

Linux用户分为:拥有者、组群(Group)、其他(other)
linux中的文件属性过分四段,如  -rwzrwz---

第一段  (第一个字符)


-就是普通的文件

d表示是目录

 c表示是字符设备(在linux/unix,所有的设备都是文件)

b是块设备文件

s是socket文件

下面给出所有文件类型标识:

 `-'
 regular file
 `b'
 block special file
 `c'
 character special file
 `C'
 high performance ("contiguous data") file
 `d'
 directory
 `D'
 door (Solaris 2.5 and up)
 `l'
 symbolic link
 `M'
 off-line ("migrated") file (Cray DMF)
 `n'
 network special file (HP-UX)
 `p'
 FIFO (named pipe)
 `P'
 port (Solaris 10 and up)
 `s'
 socket
 `?'
 some other file type


第二段 (三个字符)rwz  是指拥有者是否具有读、写、执行的权限  

类似于windows中的所有者权限比如 administrator 对文件具有 修改、读取和执行权限
 
第三段 (三个字符) rwz 是指所属于这个组的成员对于这个文件是否具有读、写、执行的权限
类似于windows中的组权限比如administrators组,属于这个组的成员对于文件的都有 可读可写可执行权限
 
第四段  (三个字符) 是指其他人对于这个文件是否具有读、写、执行的权限

类似于windows中的 anyone 一样就是说所有人对着个文件都会有一个怎样的权限.


参考资料:https://blog.csdn.net/see__you__again/article/details/52079221

猜你喜欢

转载自blog.csdn.net/chenmoshashou2/article/details/80700480