# 文件权限

Linux系统上对文件的权限有着严格的控制，用于如果相对某个文件执行某种操作，必须具有对应的权限方可执行成功，一些配置如ssh的配置文件夹只能是600.

Linux下文件的权限类型一般包括读，写，执行。对应字母为 r、w、x

权限： r=4，w=2，x=1

```
rwx = 4 + 2 + 1 = 7

rw = 4 + 2 = 6

rx = 4 +1 = 5
```

可以使用chmod设置文件权限：

```
# 可执行权限。
# 不能设置/sdcard文件夹里的文件可执行权限
chmod +x file

# 运行可执行权限文件
./file

# 设置拥有者可读写，其他人不可读写执行
chmod 600 file
```

termux如果没有root权限也不能修改其他权限，就不介绍了。


---

# 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://termux-wiki.zsxwz.com/untitled/wen-jian-quan-xian.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.
