mysql UDF : fopen = permission denied

Posted by lindenb on Server Fault See other posts from Server Fault or by lindenb
Published on 2010-05-26T15:08:29Z Indexed on 2010/05/26 15:12 UTC
Read the original article Hit count: 654

Filed under:
|
|
|

Hi All,

this is question I already asked on SO but I wonder if this could be a SysAdmin problem.

I'm trying to create a mysql UDF function , this function calls "fopen/fclose" to read a flat file stored in /data. But using errno (yes, I know it is bad in a MT program...) I can see that the function cannot open my file:

"Permission denied"

I tried to do a

chmod -R 755 /data (as well as 777, chown -R mysql:mysql /data etc...)

but it didn't change anything.

when I copied the flat file to /tmp : OK, my UDF was able to 'fopen' the file. I'm puzzled.

currently , I've got:

drwxrwxrwx 4 pierre root 4096 2010-05-26 16:51 /data
drwxrwxrwx 3 pierre root 4096 2010-05-18 09:41 /data/dir1
drwxrwxrwx 3 pierre root 4096 2010-05-18 09:41 /data/dir1/dir2
drwxrwxrwx 4 pierre root 4096 2010-05-18 10:27 /data/dir1/dir2/dir3
-rw-r--r-- 1 pierre root 50685268 2005-12-10 00:01 /data/dir1/dir2/dir3/myfile.txt

Any idea ?

© Server Fault or respective owner

mysql UDF : fopen = permission denied

Posted by Pierre on Stack Overflow See other posts from Stack Overflow or by Pierre
Published on 2010-05-26T07:51:49Z Indexed on 2010/05/26 8:11 UTC
Read the original article Hit count: 654

Filed under:
|
|

Hi All, I'm trying to create a mysql UDF function , this function calls "fopen/fclose" to read a flat file stored in /data. But using errno (yes, I know it is bad in a MT program...) I can see that the function cannot open my file:

"Permission denied"

I tried to do a

chmod -R 755 /data

but it didn't change anything. Any idea ?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about permissions