PHP 和 file_exists - 文档注释的澄清

发布于 2024-09-16 02:43:39 字数 284 浏览 4 评论 0原文

我正在检查 file_exists()< 的文档/a> PHP 函数。

该文档在某个时候写道:

检查是使用真实的UID/GID而不是有效的UID/GID来完成的。

这意味着什么?我不知道。

有人可以向我解释一下吗?

I was checking the documentation for the file_exists() PHP function.

The documentation at some point reads:

The check is done using the real UID/GID instead of the effective one.

What does that mean? I have no idea.

Can somebody please explain that to me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡墨 2024-09-23 02:43:52

这是 unix 的事情:

UID = UserID
GID = GroupID

真正的UID/GID是创建进程的用户/进程的UID/GID。

It's a unix thing:

UID = UserID
GID = GroupID

The real UID/GID is the UID/GID of the user/process that created the process.

小伙你站住 2024-09-23 02:43:49

Linux 系统中的所有文件都具有所有权和权限,这些权限描述了系统用户对该文件或目录的访问权限。基本权限为读、写和执行,并分配给三类用户;文件的所有者、属于特定组的进程以及系统中的所有进程。

您可以在下面找到详细报告
http://www.linux-tutorial.info/modules。 php?name=MContent&pageid=321

All of the files in a Linux system have ownerships and permissions, these permissions describe what access the system's users have to that file or directory. Basic permissions are read, write and execute and are assigned to three classes of user; the owner of the file, processes belonging to a particular group and all of the processes in the system.

You can find detailed report below
http://www.linux-tutorial.info/modules.php?name=MContent&pageid=321

多情癖 2024-09-23 02:43:47

有效UID/GID是软件当前正在使用的UID/GID(例如,root执行的软件可以将其UID/GID更改为daemon:daemon,因此有效UID/GID也会更改。真实UID/GID是进程所有者的UID/GID在进程启动后不会改变,

因此,file_exists调用是在进程所有者的权限下执行的。

The effective UID/GID is the UID/GID the software is using right now (for example, software, executed by root can change it's UID/GID to daemon:daemon, so effective UID/GID is also changed. Real UID/GID is the UID/GID of the process owner and it never changes after the process is started.

So, file_exists call is executed with the permissions of the process owner

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文