Jump to content

(SOLVED) BIG PROBLEM: images don't show after change of FTP permissions by host


ZuZu

Recommended Posts

Most images in the img folder uploaded through the PS backoffice had permission 600. I could not change or download them to my pc. The owner of the file was 'apache'. In order to make a backup of my img folder I had asked my host to make me owner so that I could change the permissions of the files.

Now none of the images show in either my backoffice or store front. Even when I upload the ones that I do have backupped again they don't appear..... just the red X-es indicating that the images isn't there.

Please help... what can I do?

See pic of backoffice and you can imagine what my store lookes like... (i closed it)

Thanks!

12357_gdeormIKGSWG7Finlkiy_t

Link to comment
Share on other sites

If you are the owner and the permissions are set at 600 then I don't think php would be able to read them. Usually php runs as user 'nobody' from what I have heard. You don't need anything more restrictive than 644 for images.

Several suggestions for the longer term (any one should work):

1) get your host to change the ownership of the files as from time to time as needed
2) get your host to ensure that ftp and php are in the same group
3) run php in such a way that you are the owner (suPHP)
4) backup using cPanel instead of ftp

hth

Link to comment
Share on other sites

As radders says, you need to change the permissions on the files so that Apache (the web server) can read them. Most FTP clients should let you do this fairly easily or if you have shell access you can do the same thing much more quickly using find:

cd [put prestahop directory name here]
find . -type f \( -name \.jpg -o -name \.gif -o -name \.png \) -exec chmod 644 {} \;

If you are going to do this with an FTP program, I suggest Filezilla:

http://filezilla-project.org/

If you go with Filezilla, you need to do two things. . .

1. set up and apply a filename filter that only shows images (.jpg, .png, .gif)

This is done via the "View->Filename Filters" menu. This will make it so you are only changing permissions on images and not other important files or directories.

2. perform a recursive chmod on the root Prestashop directory

This is done by right clicking on the directory you want to change permissions under and choosing "file permissions".

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...