PHP and file_exists - clarification of documentation note

I checked the documentation for the file_exists() PHP function.

The documentation at some point reads:

Verification is performed using a real UID / GID instead of an effective one.

What does it mean? I have no idea.

Can someone explain this to me?

+4
source share
3 answers

The effective UID / GID is the UID / GID that the software is using right now (for example, software running as root can change its UID / GID to daemon: daemon, so the effective UID / GID will also be changed. / GID is the UID / GID of the process owner and never changes after the process starts.

Thus, the file_exists call is made with the permissions of the process owner

+1
source

All files on a Linux system have ownership and permissions; these permissions describe how users of the system have access to this file or directory. Basic permissions are read, written, and executed and assigned to three classes of users; file owner, processes belonging to a specific group, and all processes in the system.

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

+1
source

This is the unix thing:

UID = UserID GID = GroupID

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

0
source

All Articles