Just create a directory, give it a 777 (world writable)permissions. Now "nobody" (the http uid) can write there.
SELECT INTO OUTFILE '/path/to/your/outfile.csv' ....
"your" must have 777 perms.
"outfile.csv" must NOT exists.
unlink() it before.
You are trying "select into outfile .." from within PHP script, right ?
regards