I have a PHP web application (running on Apache / Linux) that, among other things, allows you to view some local files on a web server. Because Apache works as a special user, www, PHP has access to everything that www can get, depending on which user is registered in the application.
What is the best way to restrict access to files according to the privileges of a Unix file system for a registered user? Ideally, I could create a new process with the user ID being the registered user, but I'm not sure if this is possible. In addition, is there somewhere a standard PHP library that will perform access control and file access checks?
source
share