Jump to content
Sign in to follow this  
ZuZu

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

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Talked to the host. They claimed to have done nothing, but suddenly while they were 'looking' it was solved.... :-)

Thanks for your replies!!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More