php permissions
Posted by: cnuser
Posted on: 2008-12-22 13:54:00
I have php files that are owned by a "mysiteadmin" user account. When users browse to my site and access these php files, it doesn't seem like they execute as the mysiteadmin user. Basically, I have a php page that loads a jpg. I want to chmod the jpg to 600 so that only the mysiteadmin user can view it, i.e. I don't want someone browse to the jpg directly. But it seems like the jpg needs to be 644 or else the php page can't load it. So my question is - what permissions does the php file have when it loads and how can I enforce the logic I want? My php page uses a php script to password protect it, but I don't want users to circumvent that by browsing directly to resources that are included in the password protected php page.