File load data infile'file-name' fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.0 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I am migrating from 7.04 to 8.04. The environment is Ubuntu 64bit desktop w/LAMP added.
Here is the error in 8.04:
mysql> load data infile '/var/www/
ERROR 29 (HY000): File '/var/www/
mysql>
The message is a permission error, but I have 777'ed the entire /var/www to no avail.
root@voyager:/var# ls -lh /var/|grep www
drwxrwxrwx 54 root root 4.0K 2008-06-28 13:25 www
root@voyager:/var# ls -lh /var/www|grep tradesim
drwxrwxrwx 19 gelmjw gelmjw 4.0K 2008-06-14 10:48 tradesim
root@voyager:/var# ls -lh /var/www/tradesim | grep foliofn
drwxrwxrwx 5 gelmjw gelmjw 12K 2008-06-30 14:08 foliofn
root@voyager:/var# ls -lh /var/www/
-rwxrwxrwx 1 gelmjw gelmjw 14K 2008-06-30 14:08 /var/www/
On Tue, Jul 01, 2008 at 01:44:48AM -0000, John Gelm wrote: tradesim/ foliofn/ MA46255006_ open_tax_ lot.csv' into table otl_csv; tradesim/ foliofn/ MA46255006_ open_tax_ lot.csv' not found (Errcode: 13)
> Public bug reported:
>
> I am migrating from 7.04 to 8.04. The environment is Ubuntu 64bit
> desktop w/LAMP added.
>
> Here is the error in 8.04:
> mysql> load data infile '/var/www/
> ERROR 29 (HY000): File '/var/www/
> mysql>
>
> The message is a permission error, but I have 777'ed the entire /var/www
> to no avail.
This is due to the apparmor profile for mysqld that disallows the mysqld
process to read files in /var/www.
You can emulate the load data infile SQL statement with the mysqlimport
utility and use the LOCAL option (so that the file is sent to the mysqld
rather then mysqld opening the file directly).
Another option is to update mysqld apparmor profile to allow read access /wiki.ubuntu. com/DebuggingAp parmor for more
to your file. See https:/
information on this.
status wontfix
-- www.ubuntu. com
Mathias Gug
Ubuntu Developer http://