开发者

PHP and file_exists - clarification of a note on the documentation

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 m开发者_C百科e?


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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜