Upload error and images not showing - Permissions error? Upload error and images not showing - Permissions error?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Upload error and images not showing - Permissions error?

Started by Monty, June 29, 2011, 09:49:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Monty

Hello,
I have read a lot of different stuff around here, trying to make it work on my own but I am desperate now. Hopefully you will be able to tell me what might be wrong.
Few days ago I have created one more Coppermine gallery, and for the first time with more users and their uploads and such. I have created by each album and by some uploaded some files. All was fine, images uploaded correctly, thumbs and such created correctly as well.
Today morning I went to gallery at work and noticed that all images were replaced by the nopic image of Coppermine. As I was at work I was not able to get to FTP so I just tested to redo all thumbs but it ended in completely screwing them and not even the nopic is shown for the ones that had something.
At home I checked that in MySQL database the links are showing correctly to the existing images that I found on the FTP server so nothing seems wrong there, even the thumbs are still there intact. I have checked that albums, userpics still have 777 rights, also all the folders in userpics have 777 rights. All files from Coppermine I created by user 33 but I guess it is correct. All files are present and all data in MySQL seems correct as well.
To check it more I tried to upload new file but it is not possible with error like it does not have rights to write to albums, but I checked and did chmod to be sure that rights on the folders are 777.
Out of desperation I tried to turn register_globals off and display_errors on but nothing changed.
My Gallery
Login: Test123
Password: Test123
Album created in Ruzne category named Test and default language changed to English for you. All the setup also setup hopefully as per guide for the testing. If you will not believe me on the permission for albums folder I can provide screenshots.

Αndré

I get the following error message
QuoteCritical error
Impossible to move sun-set.jpg to albums/userpics/10018/!

File: /var/www/mista-raime.cz/WWW/galerie/db_input.php - Line: 626

That message is explained in the docs: http://documentation.coppermine-gallery.net/en/upload_troubleshooting.htm#upload_error_messages_impossible_to_move

Please check the permissions of the directory albums/userpics/10018/

Monty

Quote from: Αndré on June 30, 2011, 02:32:02 PM
I get the following error message
That message is explained in the docs: http://documentation.coppermine-gallery.net/en/upload_troubleshooting.htm#upload_error_messages_impossible_to_move

Please check the permissions of the directory albums/userpics/10018/

This is the permissions of folders in the userpics folder:

drwxrwxrwx    2 33       33           4096 Jun 29 20:47 10001
drwxrwxrwx    2 33       33           4096 Jun 27 21:52 10002
drwxrwxrwx    2 33       33           4096 Jun 23 12:18 10003
drwxrwxrwx    2 33       33           4096 Jun 23 12:20 10004
drwxrwxrwx    2 33       33           4096 Jun 24 09:20 10005
drwxrwxrwx    2 33       33           4096 Jun 23 12:26 10006
drwxrwxrwx    2 33       33           4096 Jun 23 12:22 10007
drwxrwxrwx    2 33       33           4096 Jun 27 22:04 10009
drwxrwxrwx    2 33       33           4096 Jun 23 12:24 10011
drwxrwxrwx    2 33       33           4096 Jun 23 12:27 10015
drwxrwxrwx    2 33       33           4096 Jun 23 12:28 10016
drwxrwxrwx    2 33       33           4096 Jun 29 21:12 10018
-rw-r--r--    1 4001     pureftp      1411 Jun 22 05:43 index.php
-rw-r--r--    1 4001     pureftp       136 Jun 22 06:07 no_FTP-uploads_into_this_folder!.txt
-rw-r--r--    1 4001     pureftp       136 Jun 22 05:43 no_ftp-uploads_into_this_folder!.txt


Everything is as it should be.

Αndré

To verify that PHP has really write permissions to that directory, create a PHP file with the following content in your gallery root and visit it with your browser:
<?php echo file_put_contents('albums/userpics/10018/test.txt''test') ? 'writeable' 'not writeable';

Monty

Quote from: Αndré on June 30, 2011, 05:19:53 PM
To verify that PHP has really write permissions to that directory, create a PHP file with the following content in your gallery root and visit it with your browser:
<?php echo file_put_contents('albums/userpics/10018/test.txt''test') ? 'writeable' 'not writeable';
http://www.mista-raime.cz/galerie/test.php
So I see it is not allowed. Problem now is that I do not have root and it was created by the 33 so it does not allow me now to do any changes to the rights... Any easy advice on this one or at least some idead how it might have happened?

Αndré


Monty

Quote from: Αndré on July 14, 2011, 11:19:08 AM
Ask your hosting provider to fix the permissions.
I copied everything, deleted and uploaded so now I can insert files, at least the script is saying writeable now. But old thumbnails are still not available and gallery still looks messy. Any better idea than adding all photos once again?


Monty

Quote from: Αndré on July 15, 2011, 09:30:40 AM
Permissions seems to be correct. Please check your thumbnail settings:
http://documentation.coppermine-gallery.net/en/configuration.htm#admin_picture_thumbnail_use-dimension
http://documentation.coppermine-gallery.net/en/configuration.htm#admin_picture_thumbnail_max-dimension
http://documentation.coppermine-gallery.net/en/configuration.htm#admin_picture_thumbnail_height

There was no problem with thumbnail setup. I went to moderator tools and did there update of thumbnails and it is fixed now and seems to work fine (info for anybody encountering similar problem so they know how I fixed the last part of the issue).
Thank you very much for your help.