Hello there!
I´ve a problem that have been asked a lot of times before, but none of them has been answered:

 * El archivo seleccionado /home/planetac/public_html/files/tmp/tmp_pMLIK8 no se pudo actualizar, porque el destino files/pictures/picture-1.png no está configurado correctamente.
* Failed to upload the picture image; the pictures directory doesn't exist or is not writable.

This is the error that appears when I try to upload a new profile image.
I´ve searched the forum for answers but couldn´t get them:

# Failed to upload the picture image; the pictures directory doesn't exist or is not writable.
users can't upload photos anymore
I´ve also find this Drupal Issue but cann´t really get if this is the same thing of what I´m talking about.
Anyway, I´m using the latest Drupal version, and the patches mentioned there should be inside core by now...

I really hope someone can help with this... :)

BTW:
The roiute to system files is: files
Temporary Files: files/tmp
Upload Method: Private (I´ve recently upgrade my Drupal site from 4.7 to 5.6, and it was set to private then... and was working ok...)
Image Module: The image files are inside: images folder (that´s inside files folder)
I use image module 5.x-1.6 version, and
Img_Assist 5.x-1.6 version.
According to the Img_Assist module those versions should work ok. Anyway, I´ve tried without the img_Assist module, and the problem persists...

Any thoughts?
THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!

Rosamunda

Comments

vm’s picture

have you double cheked that the folder is still writeable ? CHMOD 777 or 775 or 755 ?

check both the files folder and the tmp folder

you don't mention doing so in your breakdown and that is part of what the error message states could be the problem.

Also of note, using the private file system method, your files folder should be one level above the public root or private file method isn't actually doing anything but changing the path. The files are still accessible inside the public root and can be accessed with a browser using the proper path.

Rosamunda’s picture

That wasn´t what solved the issue though ;)
At /admin/user/settings it wasn´t properly setted the route to the pictures folder.
Don´t ask me how that happened, because it should be the same as it always was, I mean this was an upgrade of a working site after all...
Anyway, I truly appreciate your help and time!!!!!!!!
Again, many thanks!!

Rosamunda
Buenos Aires | Argentina
www.ligadelconsorcista.org

gavin_s’s picture

All of a sudden the same is happening for me. User pictures are stored in /files/pictures and the folder has 775 attributes.

When I or a user try to upload a user picture we get:

    * The selected file /tmp/tmp_GfqBm5 could not be copied.
    * Failed to upload the picture image; the pictures directory doesn't exist.

I checked in user > settings and the path to user pictures is 'pictures' with the help text underneath identifying 'Subdirectory in the directory files/ where pictures will be stored'. So that's correct.

This has always worked, for a year, no suddenly it's not.

One strange thing. When I CHMOD the pictures directory to 777, it changes back to 775

solutionsphp’s picture

Same issue here!

Files dir is set to 777.

Pictures image path is set to "avatars" (mapping to files/avatars). This dir is also 777.

This was working without issue, no changes have been made to the site in months, now it's not working.

Drupal 5.2. PHP 5.1.6.

Any ideas? A change in PHP versions maybe? (I guess not, the build date is last May, and this functionality was working in Oct.)

gavin_s’s picture

I changed the directory to pictures2 and it works fine now. Even the old stuff in 'pictures' is still surfaced.

blogjam’s picture

This worked for me too.

vm’s picture

Drupal 5.2 ? you are 5 security releases behind, you should consider updating your site to avoid being hacked by publicly known exploits.

coolmccool’s picture

I've had similar problems and had a hell of a job finding an answer... My host - Servage - was running PHP5 with Safe Mode ON. This meant that any directories created by Drupal itself had messed up permissions, UID... [this affected image upload and file upload]

Solution was to
1. backup and then delete the offending directories
2. recreate the offending directories manually and upload by FTP
3. set correct permissions
4. that's it

hth

blogjam’s picture

I have the same issue. Folder permissions are correct, but I'm getting the same "directory doesn't exist or is not writable" error message. I've tried downloading the old pictures and uploading them to a new directory and changing the user image path, but this doesn't work either. New uploads do make it as far as the tmp directory without any problem - the problem seems to occur with the next bit of the process.

Any further suggestions gratefully received. Rosamunda: did you ever resolve this issue?

Thanks.

Rosamunda’s picture

I´ve upgraded a site from 5.x to 6.x and have the same old problem. I´ve found that all works ok whan I let files inside pictures folder in 777 AND put files in the root, besides all other default drupal folders, not inside sites/all nor sites/default.

Hope it helps.

sgdev’s picture

I've started seeing this issue on a site and it makes no sense why it is happening. Permissions on /files, /files/pictures, and /tmp are all set to 777. If a user attempts to change their picture they receive the same error messages that have been noted before:

* The selected file /home/public_html/tmp/tmp_xTE9iK could not be copied.
* Failed to upload the picture image; the pictures directory doesn't exist or is not writable.

New users are able to upload a picture for themselves, but users with an existing picture cannot change their image, even if they select the "Delete picture" checkbox.

This worked for months before with no issues, now having a problem with it. Running Drupal 5.15, PHP 5.2.8, MySQL 5.0.67, Apache 2.2.11.

furunk3l’s picture

... for me with drupal 6.10. plus i cannot use image galleries at all. file attachments work like a charm, but when it comes to images, no go.
altering any folders in the image_module or filesystem settings changes nothing.

UPDATE:

I was able to fix it. I changed the ownership of the images folder to the apache user (www-data) and it instantly worked for me. You should be able to alter the apache2 conf itself, so the ownership of folders do not matter at all.

prokopton’s picture

Here's what worked for me on Ubuntu 10.04 LTS and PHP 5.2.x:

chown -R www-data:www-data /var/www/files/pictures/

chmod 775 /var/www/files/pictures/

You might want to use 777 if 775 doesn't work.

ressa’s picture

Thank you! For some reason admin couldn't upload images, but normal users still could. The chown + chmod above fixed it.