Koozali.org formerly Contribs.org

Obsolete Releases => SME Server 8.x => Topic started by: Smallbox on January 20, 2017, 12:23:30 PM

Title: mysql Select INTO OUTFILE error 13
Post by: Smallbox on January 20, 2017, 12:23:30 PM
After update my SME Server I have Error in mysql

I want create sql dump table va_header_links from my base to user directory and use follow command

SELECT * INTO OUTFILE '/home/e-smith/files/users/admin/home/tmp/va_header_links_2017012114582.sql' FROM va_header_links

and have error

Can't create/write to file '/home/e-smith/files/users/admin/home/tmp/va_header_links_2017012114582.sql' (Errcode: 13)

I get permission for mysql user and this is dont help. But than I create this dump to \tmp directory I dont have error.
Please help.
Title: Re: mysql Select INTO OUTFILE error 13
Post by: Stefano on January 20, 2017, 12:28:24 PM
your script should use another dir as target (you'd create a /var/lig/mysql-files owned by mysql:mysql) then move the file elsewhere

mysql can't traverse /home/e-smith/files/ dir AFAIK
Title: Re: mysql Select INTO OUTFILE error 13
Post by: Smallbox on January 20, 2017, 01:07:10 PM
your script should use another dir as target (you'd create a /var/lig/mysql-files owned by mysql:mysql) then move the file elsewhere

mysql can't traverse /home/e-smith/files/ dir AFAIK

May be I can use secure-file-priv key in my.cfg to get this access?
Title: Re: mysql Select INTO OUTFILE error 13
Post by: Stefano on January 20, 2017, 01:37:04 PM
please, don't poke with your server..

explain your problem, not your solution, thank you
Title: Re: mysql Select INTO OUTFILE error 13
Post by: Stefano on January 23, 2017, 11:00:06 AM
did you solve your issue?