php - Writing/Reading & Permissions -
another dev , creating website , using php read/write to/from our site's directory. reason, on end works fine can 1 type of i/o work... if modify httpd.conf
file , change user:
user _www //change system user name (spencer) group _www
i can upload image files our directory, make change, can no longer read text files causes exception:
uncaught syntaxerror: unexpected token <
on line:
var results = $.parsejson(data);
if me better understand relevant portion of httpd.conf file included above , me direction improving setup, appreciative!
edit:
when add console.log(data)
before json parse, output <b>warning</b>: chmod(): operation not permitted in <b>/users/spencer/programming/...
, error contains text of file i'm trying open..
after digging more, turns out causing problem: chmod($filename, 0777);
, guess problem because php user , system user clash. found info php , chmod()
function here
removed irrelevant code
Comments
Post a Comment