[cs631apue] question about using access(2) to check file permissions

Jan Schaumann jschauma at stevens.edu
Tue Nov 19 23:29:42 EST 2013


lbustama <lbustama at stevens.edu> wrote:

> Would sws or other web server ever be run using setuid or setgid to a  
> different user or group, root for example.

No.  Usually, it would be the opposite: the web server starts out as
root (in order to be able to bind port 80), then drops privileges and
switches to a regular, dedicated user account.

All file access is determined based on whether or not that user has
access.

Your web server does not need to worry about that.  You will serve any
file that the current process owner has access to; ie, just let Unix do
its thing.

-Jan


More information about the cs631apue mailing list