LAMP uploaded file permissions preventing db upload

From: Date: Sun, 26 Sep 2004 02:42:41 +0000
Subject: LAMP uploaded file permissions preventing db upload
Groups: php.db 
Request: Send a blank email to php-db+get-36391@lists.php.net to get a copy of this message
On my LAMP system, I am using the http post method for uploading files from the browser into the /tmp directory. Then using the MySQL "load file" command to load that file into the database. Well at least I am trying to. The upload to the /tmp directory is working fine, but due to file permissions, the load into the db is failing. Apache/PHP is running as nobody:nobody (I have tried different groups with no luck) MySQL is running as mysql:mysql permissions on /tmp are currently: drwxrwxrwx 12 root root 4096 Sep 25 22:17 tmp permissions on a file that has been uploaded to /tmp are currently: -rw------- 1 nobody nobody 255775 Sep 25 22:17 test.csv If I change the permissions on the file to world-readable the db load works as expected. Any ideas on how to get Apache/PHP to write the file to /tmp as world-readable would be greatly appreciated. Of course if I should be taking a different approach, I would be welcome to recommendations there as well. Thanks Will

« previous php.db (#36391) next »