Uploaded files via PHP not avail to MySQL

Fahrvergnuugen

I am the law!
I have a PHP script which uploads tab delimted text files into the /tmp dir. The script then tells MySQL to import that file.

The file uploads fine, but MySQL does not have permission to read the file. What can be done about this?
 
That sounds like the ol' /tmp bug that must not have been fixed with later updates (<em>do</em> you have the 10.0.+ updates?).

The /tmp directory has goofed up permissions. Try changing its permissions to rwx for everyone like this:
Code:
$ <b>chmod 777 /tmp</b>
See if that helps.

Security gurus, should we be concerned about making /tmp rwx for everyone?

-Rob
 
The best choice for /tmp (or technically /private/tmp) is actually 1777, so user A can't delete user B's files in /tmp.
 
Okay, Here is what I did:
% sudo chmod 777 /tmp
% ls -l
lrwxrwxr-t 1 root admin 11 May 11 18:03 tmp -> private/tmp

And heres what I get:
The file '/tmp/php002028' must be in the database directory or be readable by all

I might add that this same script works perfectly on my Linux box. Puzzled.
 
Back
Top