Jason C <
jwca...@gmail.com> wrote:
> On Thursday, November 17, 2011 7:37:20 AM UTC-5, Axel Schwenke wrote:
>> ~ $perror 13
>> OS error code 13: Permission denied
>>
>> So obviously something is wrong with file permissions.
> By default, all of my public directories are created at 0755. I
> double checked, and yes, it's definitely world-readable.
>
> When I FTP to the file as root, though, I see that file.csv has an
> Owner/Group of root/root (where the PHP file is user/user).
> Could that be a problem?
The file is opened (or tried to) by the mysqld process which is
typically running under it's own uid of 'mysql'. This user must be
able to open the file. If you want to try that, become that user
(su - mysql) and try if you can open the file.
The error message indicates an error at stat'ing the file. So mysqld
did not even check the file permissions - it was denied permission
when trying to do so.
Maybe you're running apparmour or similar? This could also explain
why mysqld couldn't access the file. Check the syslog.
XL