Tuesday, July 31, 2012

Ubuntu 10.04 LTS AppArmor - Pesky little creature

Just wasted about 7 hours trying to fix a stupid issue. It seems that the latest Ubuntu Server edition 10.04 LTS comes with AppArmor pre installed.

While I was trying to load a file from /var/tmp uploaded by php into the mysql database by the LOAD DATA INFILE command, it just refused to work.

A day long search of various forums let me to an interesting post viz:-
http://stackoverflow.com/questions/2783313/how-can-i-get-around-mysql-errcode-13-with-select-into-outfile

So it was AppArmor which was blocking the read for the mysqld into any directory not explicitly listed in the /etc/apparmour.d/usr.sbin.mysqld file.

What a mess :(

No comments:

Post a Comment