Magento. Destination folder is not writable or does not exists

There's only one spot in the Magento code base that uses that error language.

File: lib/Varien/File/Uploader.php
...
if( !is_writable($destinationFolder) ) {
    throw new Exception('Destination folder is not writable or does not exists.');
}   
...

Add some temporary debugging code right above this

...
if( !is_writable($destinationFolder) ) {
    Mage::Log($destinationFolder);
    //or
    var_dump($destinationFolder);   
    throw new Exception('Destination folder is not writable or does not exists.');
}   
...

This will let you know the exact folder Magento wants to write to, but can't. Examine this folder, and you'll find it's not writable. Reviewing the edge cases on is_writable may also shed some light on the subject.


Goto : lib/Varien/File/Uploader.php

Temporary change the following code and try to upload image. Now in error message you can see folder path. In folder path you have to give file permission 777 and it will work as normal. After the error is resolved revert your code to as it wass.

if( !is_writable($destinationFolder) ) {
    var_dump($destinationFolder);   
    throw new Exception(''.$destinationFolder.'Destination folder is not writable or does not exists.');
}