So I built what I thought would be this awesome reporting page in PHP that loads data from some CSV text files and creates nice Google charts and tables for our clients. I then thought it would be awesome if the text files lived in a shared Dropbox folder so that my staff can update the text files and then see their updates online without hacking any code or dealing with databases. It all works great on my local dev, but when I upload the code to my production server I run into problems. I think it's a Unix permissions problem, here is the PHP error:
[Sun Apr 07 11:27:58 2013] [warn] [client 220.127.116.11] mod_fcgid: stderr: PHP Warning: file(/root/Dropbox/Reports/client-report.csv): failed to open stream: Operation not permitted in /var/www/vhosts/mydomain.com/httpdocs/my-awesome-report-page.php on line 49, referer: http://www.mydomain.com/my-awesome-report-page.php
What's the best way to allow PHP to grab the CSV files from
/root/Dropbox ? Production is running CentOS 5.8.
The files in site's httpdocs folder all seem to belong to mydomain:psacln, whereas the files in root ~ are root:root.
As discussed in the comments, I would like to find a secure solution. The report page HTML is hidden behind a login.