huggettm Posted April 11, 2018 Share Posted April 11, 2018 Hi, I run a few sites that have shared images, I have always done this via sym link but it is causing issues recently. rather than that, or repeat the images for each website - is it possible to redirect the images to be sourced from another website location rather than the folder images/source? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 11, 2018 Share Posted April 11, 2018 They are stored in the file manager too. Do you have a shared database? Can't see how you have even made this work at all. Could you alias an Amazon S3 bucket and use mod_rewrite to change the image URL's to serve them from the cloud? I'm sure its doable if you have the patience. Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 11, 2018 Author Share Posted April 11, 2018 no the database is not shared, has worked fine for years I dont know about the mod_rewrite Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 11, 2018 Share Posted April 11, 2018 Why did the symlink stop working? Server security update? Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 11, 2018 Author Share Posted April 11, 2018 my hosting company are being utterly useless at telling me why. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 11, 2018 Share Posted April 11, 2018 This is why you need to be your own host. Maybe they have jailed the cPanel accounts or made security changes. To be fair to them symlinking across accounts could be dangerous. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 11, 2018 Share Posted April 11, 2018 Are you interested in just the source of the images being in a specific location? CubeCart skins create specific sized renderings of those source images and save them in /images/cache/. CubeCart then gives the appropriately sized images in that cache as the URL to the storefront skin template. So, most, if not all the product images are coming from your site anyways. In admin, when an AJAX request is made for a list of source images and files for the image picker and digital file picker, there must be an API script to receive that AJAX request, interpret it, and send back the JSON response. I think it wouldn't be too hard to make slight edits to where CubeCart sources images - assuming your site has permission to reach out - at server level - to outside locations. Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 12, 2018 Author Share Posted April 12, 2018 they have come back now and confirmed it was an issue with the link ownership. I might look into other options though, particularly hosting all the images seperately for google feeds etc so if it goes wrong again its not both websites and feeds all knocked out in one. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12, 2018 Share Posted April 12, 2018 Just now, huggettm said: they have come back now and confirmed it was an issue with the link ownership. I might look into other options though, particularly hosting all the images seperately for google feeds etc so if it goes wrong again its not both websites and feeds all knocked out in one. Makes sense. Can't say I blame them. Stuck between a rock and a hard place here... I suppose the only solution is to put all sites on one cPanel account if you want to use symlinks. However if one gets hacked they all get hacked. Maybe you do need to mirror or rsync the images/source folder. I don't blame the hosting company for making this change. It's best for the greater good. Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 12, 2018 Author Share Posted April 12, 2018 FYI anyone looking to use a sym link for multiple stores, I did it by installing cubecart so it creates its image folder structure, then creating the sym link afterwards to the source folder. I then updated the product images using the g7 data pump addon. 1 minute ago, Al Brookbanks said: Makes sense. Can't say I blame them. Stuck between a rock and a hard place here... I suppose the only solution is to put all sites on one cPanel account if you want to use symlinks. However if one gets hacked they all get hacked. Maybe you do need to mirror or rsync the images/source folder. I don't blame the hosting company for making this change. It's best for the greater good. its 40,000 images so I didnt want to have it copied on every website but typing it out... yeh thats probably why it goes wrong lol Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12, 2018 Share Posted April 12, 2018 Totally understand how you can't duplicate 40,000 images. I'm sure it can be done with specific group memberships but you probably need your own VPS. Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 12, 2018 Author Share Posted April 12, 2018 We have a VPS with our hosting provider Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12, 2018 Share Posted April 12, 2018 So you should be able to do this then. I don't know if this would work but you could try creating a new linux user with its own group. e.g. imgsrc:imgsrc with a home directory at /home/imgsrc Then move all the images there and add each of your cPanel accounts to the "imgsrc" group and give all the account a symlink form their /home/{user}/public_html/images/source folder to /home/imgsrc. You might be able to take this further and symlink the images/cache folder to save more disk space. This is all theory and may not work at all but sounds doable. Quote Link to comment Share on other sites More sharing options...
huggettm Posted April 12, 2018 Author Share Posted April 12, 2018 that is how it is set up, but i think the user permissions change when an update it applied Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted April 12, 2018 Share Posted April 12, 2018 Server update maybe? I don't think CubeCart will change anything. Saying that it may try to change the chmod value of the images/source folder. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.