[Solved] The selected file C:\php5\uploadtemp\tmpDA.tmp could not be copied

jproducer - April 10, 2009 - 14:09

I am having a real issue with file attachments and have searched these forums only to try every fix and have no luck. To me this is a permissions issue and I'm not sure how it started. It is file attachments for any node, so it is not a page permission or permission in the site as a whole. I made sure that authenticated users had rights to file attachments and even tried setting all groups to have rights. No change.

I am running on IIS 6 Windows server so CHMOD permissions are non existent.

I have tried to change folder where temp files go and set permissions for IUSR to have full rights. No change. This seems to be what everyone is saying can fix this issue. I'm afraid this is a little further for me. So I put all settings back to default when it used to work.

Here is error: The selected file C:\php5\uploadtemp\tmpDA.tmp could not be copied

I'm at a loss here. Can anyone help?

When does the error message

cog.rusty - April 10, 2009 - 15:11

When does the error message appear? As soon as you are trying to save a node with an attachment? Does this also happen with small files? (under 1MB) Does this happen with all content types? ("story", "page" etc)

Check the admin/settings/file-system page.
- What is your "Temporary directory"?
- What is your "Download method" setting?

Run a phpinfo() (see http://drupal.org/node/59680)
- What is PHP's "upload_tmp_dir"?
- Is there any mention of "safe_mode" or "open_basedir"? Is "magic_quotes_gpc" off?

Are you using only the core upload module or do you have any additional file/image modules installed? Which ones? Are they recent versions?

more info

jproducer - April 10, 2009 - 15:31

Okay, I'll try and answer all I can. I inherited this issue, so that's why it's mind boggling.

1. The error message appears after node is saved. The first part is okay and is creating temp file as far as I can tell.

2. I know where you're headed with the question of size. The php settings are fine and set to a higher mb than default. Yes, it does happen with small files.

3. temp directory is C:\php5\uploadtemp (although, i did try making a new temp directory in site root and changed path, same result.) Right now method is set to private, but I have tried both public and private.

4. Because I'm not exactly sure what you're looking for on phpinfo, here's the link [http://www.sagetorch.com/phpinfo.php]

5. Looks like there is an attachment module. 5.X

Just to make you aware, this worked a few days ago. I tried updating to 5.1.6 and this is where the issue started, so I rolled back to the previous days version. I am fairly new to drupal, so try to be patient with my lack of information.

Thank you in advance

Your settings seem fine. The

cog.rusty - April 10, 2009 - 17:42

Your settings seem fine. The attachment/filemanager modules are a bit old and I don't remember much about their settings. Since they were supposed to be an alternative to the core upload module, try disabling the upload module (in admin/build/modules) to see if it makes any difference.

No change after disabling

jproducer - April 12, 2009 - 05:52

No change after disabling filemanager and also upload.

The selected file C:\php5\uploadtemp\tmp11F.tmp could not be copied.

Interesting thing is as I saw with many others the .tmp file is definitely being created. The file attaches and I see it, it's once submit is pushed, that's where it errors out. I am almost sure it's permissions issues on windows files, but just can't pinpoint it.

It could be permissions. Try

cog.rusty - April 12, 2009 - 10:37

It could be permissions. Try to get more information about the error by temporarily modifying the http://api.drupal.org/api/function/file_copy/5 function in includes/file.inc. Remove the error-suppressing @ from the if (!@copy($source, $dest)) line and see if any more details about the error are displayed on screen on in your php error_log.

[SOLVED]

jproducer - April 12, 2009 - 17:27

It was in fact folder permissions, but I am embarrassed to say that if you use the attachment module, you MUST disable the upload module. Somehow through my updating to 5.1.6 I had enabled that module again. A lesson learned, sometimes it's the things you just wouldn't think about. Thank you everyone.

 
 

Drupal is a registered trademark of Dries Buytaert.