• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Cant remove old image

Status
Not open for further replies.
You need to change permissions on the dir. Chmod 777 content/images/system fixed it for me.
 
This is 2014, don't use chmod 777. Also if you are not getting the full URL is because the settings rows are not there. Did you run install.php? Are you sure that you uploaded app/install ?
 
Last edited:
Hey Rodolfo! I really like the new chevereto! But I had the same problem like emm1 and I run install.php to update successfully to 3.2.2 from 3.2.1 but still cannot upload logo.png to my chevereto system. I'm using nginx + php5-fpm but there are no errors in logs. I'm still getting : Can't remove old logo file. I try to upload the original logo.svg too but with the same error :(

I'll be grateful for your help.

Wish you all the best!
 
This is the conflicting line:

PHP:
       if($db_filename != $filename && is_readable($db_file) and !@unlink($db_file)) {
            throw new Exception("Can't remove old ".$name." file", 500);
        }

Basically when you upload logo.jpg and your old logo is logo.png the system will try to delete the old logo.png If the system can't delete that image is because you don't have the permissions over that file, is that simple.

In some cases the owner group won't match your FTP login and in those cases PHP won't have permission over the (for example) root user.

For example, this is a bad setup (I experienced the same issue in the demo)
Captura.png


As you may notice /content/images/system is on root/root but Apache is running as www-data. This means that when you want to change the logo you won't be able to do anything because the folder is owned by root and root can't be below www-data.

So if your Apache is running using www-data you should run:
Code:
sudo chown www-data:www-data * -R
sudo usermod -a -G www-data root

From /var/www/content/images/ path.

This error is very common when you use root acess to do changes in your server. Hope it helps.
 
Last edited:
I have the same problem. A clean installation everything is fine. When you upgrade there are such errors. Please do whatever photohosting could easily update.
 
Any system can have issues with ownership (files and permissions). I faced the exact same problem in one of my installations and I posted the instruction to solve it. Sadly at PHP layer I can't do anything because you can't override root or any upper level permission. You need to ask your hosting company or run the SSH command. I had this issue in just one of my servers, the one with the good config doesn't show any issue at all.

Check here for more info: https://chevereto.com/community/threads/upload-issues-images-logo-etc.4561/
 
Last edited:
finally, I get it work!

@all: you have to upgrade version by version. I mean if you are 3.0.5, you have to update to 3.1.0 -> 3.1.1 -> 3.1.2 -> .... -> 3.2.2
 
finally, I get it work!

@all: you have to upgrade version by version. I mean if you are 3.0.5, you have to update to 3.1.0 -> 3.1.1 -> 3.1.2 -> .... -> 3.2.2
Not exactly, you only need to add the files to the affected files. For example from 3.1.0 to 3.1.2 you need to consider as affected files all the files merged from 3.1.0, 3.1.1 and 3.1.2 and then run install.php
 
Status
Not open for further replies.
Back
Top