|
Posted by news on 10/13/10 11:36
news@celticbear.com wrote:
> I've a PHP script that is supposed to write results to a file using
> INTO OUTFILE, but it's not.
>
> The mysql_error says: Could not write file: Can't create/write to file
> '/var/www/html/accounts/samplesdownload/1136572640.txt' (Errcode: 2)
>
> The permissions on that folder has "a+w -R" chmoded to it, and in fact,
> other scripts can write to it, but not from a SQL querey.
>
> So looking to mySQL I look at the privileges for the user account being
> used for that database.
> And the mysql.db table, the user has Y for all privileges, but there's
> no column for the FILE privilege!
>
> So I grant the user global FILE privilege and flush, and still no
> change in the error.
>
> Any feedback as to what direction to go with this would be greatly
> appreciated!
> -Liam
Oh yeah, forgot to mention.
I also tried:
mysql> GRANT FILE ON printing.* TO 'usernamet'@'servername';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
Guess the fact there's no File column on the db table would explain why
that failed. =/
-Liam
[Back to original message]
|