On 13.05.2009 02:59, Brian Manning wrote:

Can you tell me why I'm getting this error:

DBD::mysql::st execute failed: Can't create/write to file
'/tmp/result.csv' (Errcode: 2)

You don't have create/write permissions to the /tmp directory on your
remote host as whatever user your remote host's CGI is running as.
[...]
Try just opening a filehandle in a basic CGI script on
your remote host in the /tmp directory and see if it works or not.
I'm betting not.

On a typical Unix-like system, EVERY user has write permissions on /tmp, including the "nobody" user and the database and web server accounts. The /tmp directory should have permissions 01777 (sticky, full access for everyone).

Possibly the web server and/or the MySQL server run in a chroot()ed environment where /tmp does not exist or where the permissions are more restrictive.

Possibly a file named /tmp/result.csv already exists, but is owned by another user, has the usual 0644 permissions (writeable only for the user, group and world can read) or even stricter permissions, and thus is not writeable for the web server / MySQL server account.

Alexander

--
Alexander Foken
mailto:alexan...@foken.de  http://www.foken.de/alexander/

Reply via email to