PHP *nix file permissions
date posted 22nd January 2001 21:37
Doh, I don't know if this email was actually sent to the list earlier..
but I forgot that I was not yet subscribed under my new email, so I
haven't recieved anything. Anyway, here goes again.. If anyone already
replied, could you resend your replies, perhaps off-list so that we
don't annoy too many people..
I have a set of downloadable files on a host that I wish to offer to
certain people for download. However, I want to protect these files so
that only those users who are registered can download the files, and
also so that only administrators can upload files. I plan to do this by
having a PHP script read in these files and then echo them through to
the user, only after first verifying that he is a legitimate user.
My problem is that, after protecting the directory in which the files
are stored, although the remote web browser will not have access to it,
neither will any PHP script. It appears that the PHP scripts run as
'nobody', even if they are owned by the user who also owns the protected
directory (the directory has all permissions turned on for the owner,
but off for other users).
I don't seem to be able to figure any way around this. I can't see
anything in the php.ini file that could change anything. Can anybody
help?
Mark