文件系统权限 [英] File system permissions
问题描述
这是一个cms,我想将服务器上的所有文件都设置为-rw -------
It was a cms and I would like to set all my files on server to -rw-------
这将使我的网站照常工作吗?否则他们不会互相阅读,例如,我有这个:
This will make my website working as usual? or they will not read each other, for example i have this:
require_once 'include/checksession.php';
推荐答案
首先,您需要了解每个段"的含义.
First, you need to understand what each "segment" means.
- 第一个三合会车主可以做什么
- 第二个三合会
- 第三部三合会其他用户可以做什么
- first triad what the owner can do
- second triad what the group members can do
- third triad what other users can do
您的权限集(-rw-------
)仅对第一个三元组(文件的所有者)具有权限,该文件仅具有read
和write
权限.
Your permission set (-rw-------
) only has permissions on the first triad - the owner of the file - which only has read
and write
permissions.
- 读取读取"权限是指用户读取文件内容的能力.
- 写入.写入"权限是指用户写入或修改文件或目录的能力.
- 执行的执行权限会影响用户执行文件或查看目录内容的能力.
- read The Read permission refers to a user's capability to read the contents of the file.
- write The Write permissions refer to a user's capability to write or modify a file or directory.
- execute The Execute permission affects a user's capability to execute a file or view the contents of a directory.
因此,组的所有者可以读取文件/目录的内容,写入文件/目录以及修改文件/目录.
Therefore, the owner of the group can read the contents of the file/directory, write to the file/directory, and modify the file/directory.
在谨慎的文件/目录所有权政策下,我 猜测 -可以,但是我不希望这样做.如果Apache/Nginx/...没有该文件的所有权,则您的应用程序将无法运行.
Under careful file/directory ownership policies, I guess this will be okay - but I wouldn't count on it. If Apache/Nginx/... doesn't have ownership of the file, your application won't work.
话虽如此,我想提几个问题;
This being said, I'd like to raise a few questions;
- 为什么要更改服务器上所有文件/目录的权限?
- 为什么要设置全局许可规则,而不是对每个文件/目录单独设置?
- 这是什么最终目标?
我会考虑 Jon T 的答案
I'd take some consideration to Jon T's answer
这篇关于文件系统权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!