php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19602 File Upload file permissions problem
Submitted: 2002-09-25 14:19 UTC Modified: 2002-09-25 17:16 UTC
From: kakins at wmsco dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.3 OS: RH Linux 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kakins at wmsco dot com
New email:
PHP Version: OS:

 

 [2002-09-25 14:19 UTC] kakins at wmsco dot com
We just upgraded our PHP from 4.0.6 to 4.2.3. I use phpMyAdmin to manage our MySQL database. Since the upgrade, when I try to upload a data file to be inserted into the database, I get the following error:

~~~~~~~~~~~~~~~~~~~~~~~~~

Error
SQL-query :

LOAD DATA LOCAL INFILE '/tmp/phpgAIpye' REPLACE INTO TABLE `customers`
FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY
'\r\n'

MySQL said:


The file '/tmp/phpgAIpye' must be in the database directory or be readable
by all

Back

~~~~~~~~~~~~~~~~~~~~~~~~~~~

Has PHP changed its file upload permissions? Mysql server runs as the user 'mysql' and PHP under 'apache'. Apparently the file upload is creating the temporary file with sole access rights (only owner has any access). I need to make it set permissions so that either (1) the 'mysql' owner or the 'apache' group can access these files or (2) that everyone as read access. This only seems to happen with a direct MySQL data file upload. (LOAD DATA INFILE...)

Is this possible?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-25 14:25 UTC] sander@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.
 [2002-09-25 14:51 UTC] kakins at wmsco dot com
I would say that when a newer version of software causes code that ran correctly in an older version to produce errors, then a bug has been introduced (but, of course, this can argued from other points of view).

I will notify phpMyAdmin and MySQL of this change in the event they are not aware of it already.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 07:01:31 2024 UTC