Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Issue with file ownership when doing a full backup


Guest

Recommended Posts

I have a problem with the way OSCommerce is setting permissions for images added through the OSCommerce admin. When a product is added, and the image uploaded, everything works great. But when it comes time to do a complete back up of the website it fails because all the images added through OSCommerce have some wacky file ownership set that I can't even fix through cPanel (filemanager) or through a shell.

 

Example:

550 Can't open /public_html/images/indexA2_c.jpg: Permission denied

ERROR:> Requested action not taken (e.g., file or directory not found, no access).

 

This is what I get for every image inside of /images when trying to manually "backup" the images folder via ftp. If I also try to chmod the images through filemanger (inside of cPanel) it doesn't squak with an error, but it also does not change the permissions from 0600 to 777 or 750 erc..

 

Anyone know what the deal would be? This website is on a shared hosting service (HostMatters), could it be the way their mySQL server interacts with the shared servers that is causing the ownership permission to be set strangely?

 

** If I get an admin at HM to manually (locally) go and chown the contents of /images/ to all or nobody will this break the site?

 

Please help! :'(

Link to comment
Share on other sites

Some FTP clients have issues with files and directories owned by "nobody", which is the default apache user if phpsuexec is not installed. I imagine your host is not running phpsuexec, which is not a good idea in a shared hosting environemnt IMO.

 

The admin should chown the directory and all files to your user, not "nobody" - this won't cause issues. It has nothing to do with mysql.

Link to comment
Share on other sites

Some FTP clients have issues with files and directories owned by "nobody", which is the default apache user if phpsuexec is not installed. I imagine your host is not running phpsuexec, which is not a good idea in a shared hosting environemnt IMO.

 

The admin should chown the directory and all files to your user, not "nobody" - this won't cause issues. It has nothing to do with mysql.

 

 

Thank you very much for the reply!

 

I'll post an update here when this is done to see if this solution worked (incase anyone else runs into it at least the info will be here for them as well). Now, I wonder what the fix to this would be for future products added to the catalog?

 

Appreciated.

Link to comment
Share on other sites

  • 2 weeks later...

I forgot to come back and post the update to this.

 

It borked the site. Now the images do not show up for any products with an image (the only product image that shows up is the "Image Not Availabe" gif for products with no image).

 

Anyone know how to fix this? Do I need to chown all the images back to no owner?

Link to comment
Share on other sites

Was nothing more than a brainfart (panic), a simple permissions issue is all this was.

 

All I had to do was change the file permissions for all the images in the /images/ folder to something sensible. They were all default set as 600 by the site when products were originally added, I chmod'd them all to 644 and that fixed it. (go figure)

 

Figured I'd update this incase anyone else runs into the same issue when backing up an entire live site. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...