This is my first week with Drupal and i'm facing some problems. When i try to upload a file i get an error message saying

The file php2B7C.tmp could not be saved. An unknown error has occurred.
File upload error. Could not move uploaded file.

I've poured through the forums here and all i keep seeing are permission issues. I'm on Windows Server 2012 / php 5.6.0 so to eliminate that i've added the everyone group and given full control on the whole drupal directory. I realize how bad this is but it's a test environment only.

I've also changed the temporary directory in Admin > configuration > Media > Temporary directory to a custom folder with the everyone group set to all full control and i get the same error. Drupal managed to put a .htaccess file in that folder(another issue for another post) so i know it's got write permissions.

It's just a base drupal install with only what ever modules come stock installed. I'm really at a loss what to do here.

I looked at the drupal logs and they don't show much...

Type file
Date Saturday, January 16, 2016 - 15:12
User jbyblyk
Location http://10.1.1.130/drupal/node/8/edit?_wrapper_format=drupal_ajax&_wrappe...
Referrer http://10.1.1.130/drupal/node/8/edit
Message Upload error. Could not move uploaded file 7027908-earth-map-dual-monitor.jpg to destination public://2016-01/7027908-earth-map-dual-monitor.jpg.
Severity Notice
Hostname 10.1.3.12
Operations

When i click on the Location link in the error message i get the following JSON out put.

[{"command":"add_css","data":"\u003Clink rel=\u0022stylesheet\u0022 href=\u0022http:\/\/10.1.1.130\/drupal\/core\/themes\/classy\/css\/components\/messages.css?o0g6fz\u0022 media=\u0022all\u0022 \/\u003E\n"},{"command":"insert","method":"replaceWith","selector":null,"data":"\n \u003Cdiv role=\u0022contentinfo\u0022 aria-label=\u0022Error message\u0022 class=\u0022messages messages--error\u0022\u003E\n \u003Cdiv role=\u0022alert\u0022\u003E\n \u003Ch2 class=\u0022visually-hidden\u0022\u003EError message\u003C\/h2\u003E\n An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (20 MB) that this server supports.\n \u003C\/div\u003E\n \u003C\/div\u003E\n \n","settings":null}]

The file i'm trying to upload is only a 72KB .jpg file.

i checked the public://2016-01/ folder and it has the right permissions.

Any help or advice would be great!

Thanks,
DSFX

Comments

VM’s picture

where is the tmp folder in your folder structure?
what is the path set for the tmp folder in administer -> file system?
what are the folder permissions?

dsfx’s picture

The folder is e:\files\temp in the file system.

In the drupal admin it's set to e:\files\temp

To help eliminate permissions issues while testing this i added the everyone group and gave them full control on this folder..

dsfx’s picture

I went into IIS > my drupal site > Authentication > Edit Anonymous Authentication > Check Application Pool Identity

For security reasons had changed my application pool user identity from IUSR to a custom account. I don't know why this fixed it because all accounts. The custom account is locked down like IUSR but for the time being it's fixed.

Thanks for your help it ended up nudging me in the right direction.

DSFX.

guile2912’s picture

Thanks a lot for this information, I was having a hard time figuring out why upload was not working having even given the full access to anyone ont tmp director was not working. You saved my day !

learnchinesewithling’s picture

i am having similar issue, but i failed to fix it. what's your IIS version?