# 权限概述

如前所述，Slackware Linux 是一个多用户系统，因此，文件系统也要适合多用户。这意味着所有的文件和目录都有一大堆权限设置来赐予不同用户不同的权限。每个文件有三种基本权限和三组权限设置。举个例子：

```
darkstar:~$ ls -l /bin/ls
-rwxr-xr-x 1 root root 81820 2007-06-08 21:12 /bin/ls
```

回忆一下，第四章 `ls` 的 `-l` 参数列出了文件和目录及其所有者。上面的例子中，权限是 `rwxr-xr-x`，用户是 `root` 用户组也是 `root` 。权限部分，尽管是紧密显示在一起，但实际上它们分为三组。前三个是文件所有者的权限，中间三个代表文件所属组的权限，最后三个代表所有人（对这个文件）的权限。

| 权限对象 | 内容    | 含义                      |
| ---- | ----- | ----------------------- |
| 所有者  | `rwx` | 其所有者 `root` 用有读，写，执行权限  |
| 所属组  | `r-x` | 其所属组 `root` 中的成员有读，执行权限 |
| 其他   | `r-x` | 其他人有读，执行权限              |

> 表 10.1：`/bin/ls` 的权限设置

对文件来说，权限含义正如其名，读（**r**ead）权限、写（**w**rite）权限、执行（e**x**ecute）权限分别能让你读、写、执行文件。但对目录来说这些又是什么含义呢？简单来说，目录的读权限能让你获取目录内容（也就是用 `ls`），写权限让你能在目录下创建文件甚至删除整个目录（即使你没有删除目录内内容的权限也没关系），执行权限能让你进入目录（举个例子，也就是可以使用内置 `cd` 进入目录）。

拿这个目录的权限举例：

```
darkstar:~$ ls -ld /home/alan
drwxr-x--- 60 alan users 3040 2008-06-06 17:14 /home/alan/
```

这是我的家目录和它的权限设置。该目录由用户 `alan` 所有，从属于组 `users` 。所有者拥有所有权限（`rwx`），所属组只有读和执行权限（`r-x`），其他人禁止对该目录进行操作。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://slackwarecn.gitbook.io/slackbook_cn/chapter_10/permissions_overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
