Author Topic: Cache file and folder permissions and 777  (Read 8750 times)

Offline tastiger

  • Newbie
  • *
  • Posts: 32
  • Karma: +8/-0
    • View Profile
    • Tassie Vapes
Cache file and folder permissions and 777
« on: December 09, 2015, 09:28:02 PM »
Hi,

I am regularly getting errors about incorrect cache files permissions with my AbanteCart 1.2.5 shared hosting cpanel on litespeed. PHP version 5.5.

I have scoured these boards reading everything I can on the topic but it is often ambiguous between posts the correct file and folder permissions for various folders for AbanteCart.

Currently I set Cache folder to 777, all subfolder of cache 777, then I set all current files in cache folders to 777

The error comes back as soon as there is activity with the store and I find new files with 644 permission.

I have gone in circles clearing cache, redoing permissions to 777, repeatedly setting new files to 777, re-searching and re-reading forum.

I have taken it up with the host and although they have spent time there has been no resolution.

A question I have is why is 777 needed (as against 775 for example) and do files actually need to be 777 or just folders.

I am at a loss to figure this error out, please what can I try?

Regards,
Mark

After a long search I found AbanteCart Cart, I found possibilities!

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #1 on: December 11, 2015, 02:48:19 PM »
Hi,
Did you get this resolved? I'm getting a similar message:

"Message status:
critical
Date:
12/11/2015 11:34:39 AM
Number of repetitions:
0
Following files do not have write permissions. AbanteCart will not function properly.
/home/stronso/public_html/system/cache/category/category.list.71.0.1_0.1449844324"

I checked this directory via the CP and this category list file couldn't be found. Maybe because it's a temporary session?

Anyway, two customers have emailed me saying they couldn't order because they were getting "duplicate invoice ID" errors or something to that effect.

Anyone have any ideas?

Can anyone help

Offline tastiger

  • Newbie
  • *
  • Posts: 32
  • Karma: +8/-0
    • View Profile
    • Tassie Vapes
Re: Cache file and folder permissions and 777
« Reply #2 on: December 11, 2015, 06:10:14 PM »
Hi Stronso,

No I don't have this resolved, but yes there is a tie to orders.

I also have had customer contact but now attempted order have dropped of all together since I went live with the AbantCart store two weeks ago so it is getting harder to diagnose with the errors more intermittent.

With the duplicate invoice ID problem, I found that was to do with AbabnteCart order numbers being the same as invoice numbers already used in Paypal with my old cart - you need to go into database and manually set the order number higher.

Go to table _orders you should see your customers duplicated orders there, set the order number of the last order much higher, then it will auto increment from there.

After I did this I manually set any new 644 cache file to 777 and  my co-operative customer was able to place an order.
After a long search I found AbanteCart Cart, I found possibilities!

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #3 on: December 13, 2015, 11:40:51 PM »
Thanks, Mark, for the detailed reply.  Forgive me for asking, but your suggestion regarding "duplicate invoice IDs" raises some questions I hope you don't mind me asking:

1) Paypal invoice #s conflicting with AbanteCart shopping cart invoice #s... hmm, I started with AbanteCart v. 1.2.3, took about 50 orders, then had trouble trying to upgrade to v. 1.2.4, so I installed AbanteCart 1.2.5 and started over with a new database. So I guess that is causing the conflicts with Paypal because the new AbanteCart install is assigning the same invoice ID's as the first install. Is this correct?

2) Database Table: So I should go and set the _orders table to higher than 50 if that was the highest invoice ID of my last AbanteCart install. Is my understanding correct? Seems pretty straightforward.

Have you got your issue resolved? My cache issue has seemed to disappear. I don't think I did anything special except clear the cache from my Dashboard.

I hope you get your issue resolved. I like AbanteCart. It's got some pretty good features for an open source platform. But I'm finding I don't have the time to be dealing with configuration issues, most of which are beyond me. I really need to be spending my time on product development instead of web development.  So as much as I like a challenge, I am considering a paid platform to avoid these headaches.
-Alonso

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4394
  • Karma: +205/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #4 on: December 14, 2015, 02:28:10 AM »
Hello, stronso.
AbanteCart team have Order Start No setting in the roadmap for the next version 1.2.6
“Chuck Norris is so amazing.”
― Mother Teresa

Offline tastiger

  • Newbie
  • *
  • Posts: 32
  • Karma: +8/-0
    • View Profile
    • Tassie Vapes
Re: Cache file and folder permissions and 777
« Reply #5 on: December 14, 2015, 02:52:24 AM »
Hi Alonzo,

1) Yes i think if you started over with 1.2.5 then the order numbers begin again and this cause the Paypal problem as paypal has already recorded payments against these numbers. I migrated from Bigcommerce so I had to set my order number higher than my last Bigcommerce invoice number for Paypal to work

2) Changing in the database is the only way I know reading the forums. You see the post by Basara that this will get easier in 1.2.6 :-)

My cache issue comes and goes makeing trying to figure out what is going on difficult. Sometimes every order will cause it, sometime there are no error.
Clearing the cache seems to make errors more frequent.

As somebody that has come from a paid platform I would like to suggest sticking with the challenge a little longer! I am finding in my short time that I have learned so much that I otherwise would not have about e-commerce and slowly but surely working towards a system that works the way I want it to for my particular products. Here is a lot more control than paid sytems and I think I have only scratched the surface of what AbanteCart can do - and AbanteCart is still developing :-) But I do agree the time and frustration when an issue is hard to solve. I did have  plenty of headaches on the paid system also! - and less control. lol

- Mark.

After a long search I found AbanteCart Cart, I found possibilities!

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #6 on: December 15, 2015, 04:46:29 PM »
Thanks, Basara, well-noted about the Order Start No. feature coming in 1.2.6. 

I hope you can add this to the documentation that there is a possibility of duplicate invoice ID conflicts with prior shopping carts with Paypal.

Mark (& Basara), thanks for the advice. I do like the complete control I get with a platform like AbanteCart, and I wrote earlier it's got a lot to like: it's pretty easy to learn, got an amazing feature set, and seems to get better and better. Still, I've been having a lot of little problems while using it.  Some problems, I believe, are not AbanteCart's fault.  I believe my hosting company (Arvixe) is behind a lot of the problems I've been having while using AbanteCart. I don't think their web servers are set up to handle AbanteCart 100% perfectly. So, although I agree software like AbanteCart gives you a LOT of control over your website, there are things like web hosting company settings that you can't control completely unless you have a dedicated server.

Also, I'm looking at Shopify as a paid solution because they have two features that I'm eager to try: Facebook & Pinterest buy buttons that your customers can buy straight from those social media sites, so it saves your customers a step.

Basara, I think it would be interesting if you surveyed AbanteCart users to see who is having the most problems and who is their web hosting company.  That way you can see if Arvixe is a good hosting partner or not.

Just a suggestion.

Offline tastiger

  • Newbie
  • *
  • Posts: 32
  • Karma: +8/-0
    • View Profile
    • Tassie Vapes
Re: Cache file and folder permissions and 777
« Reply #7 on: December 15, 2015, 06:26:25 PM »
Hi Alonso,

I thing we all have to weigh up what different features and benefits are on offer to us from the different carts and match to our own situations. I had a Facebook store tied to my last cart for near 2 year and not one order from it, but plenty of click throughs from the Facebook 'Shop Now' button direct to the website. I guess for me I prefer them on the website because I wish to expose the shopper to advocacy information as well. I actually tried Shopify, reguly doing tials over time to see what the hype was all about, but the path to doing what I wanted in a store was not my cup of tea.

With hosts, I tried a fee, and many self hosted carts before deciding on AbanteCart, and I found there is always some tweaking involved even if things loosely work out of the box. So while some host may be better than others being 100% perfect still may involve some adjustment to get things just right. I am still working on that!

I guess some of the above is why I am persisting with my issue. Somebody said to me yesterday that having one main issue is not bad!! lol

And I think I am making headway :-)

I am thinking this cache write error is actually a symptom of something else - and that may well be a host issue but I am not sure yet.

I think it is actually a failure to delete problem!

When a cache file is to be updated, meaning a write is to occur,  it looks like the original cache file is to be deleted first. If that fails, maybe a server load issue, file in use so it is not closed allowing delete, some other permission problem than write, then the write does not occur and  the system sees this as unable to write.

This need to be able to delete is why we need folders set 777 - to give delete permission as I understand it.

AbanteCart is actually attempting these deletions every 24 hours on every cache file thereby refreshing the files. This is why when I was setting files to 777  they mysteriously return to 644 - when the delete -> re-write file process happens correctly.

Code: [Select]
/**
* @var int
*/
private $expire = 86400; //one day

So this makes for complex circumstances of when a delete will be attempted with this code:

Code: [Select]
/**
                * @param string $file
                * @return null
                * @void
                */
                private function _remove($file){
                                if(empty($file)){
                                                return null;
                                }
 
                                unlink($file);
                                //double check that the cache file to be removed
                                if (file_exists($file)){
                                                $err_text = sprintf('Error: Cannot delete cache file: %s! Check file or directory permissions.', $file);
                                                $error = new AError($err_text);
                                                $error->toLog()->toDebug();
                                }
                                return null;
                }


So it is a matter of whether permissions are wrong on file creation or authority is wrongly available on deletion. It tests if the file is actually deleted so maybe some sort of timing issue or something interferes sometimes and that is why this problem seems so random or intermittent - and hard to solve.

Would think there would be a process of retry delete before issuing the error in case of timing and lock events but I cannot find that and I am certainly not experienced enough to know if the solution is in the code! lol But I have had the host check extensively for problems and nothing is showing in any Apache or other logs showing write failure.

I am also utilising multi store so I assume separate cache files are used to reflect a different subset of static data for each shop. Maybe something gets abit untoward in this area though and locks files preventing the delete?

Maybe an AbanteCart Guru can take my thoughts and expand on this
After a long search I found AbanteCart Cart, I found possibilities!

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1782
  • Karma: +247/-11
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Cache file and folder permissions and 777
« Reply #8 on: December 16, 2015, 07:28:03 AM »

My cache issue comes and goes makeing trying to figure out what is going on difficult. Sometimes every order will cause it, sometime there are no error.
Clearing the cache seems to make errors more frequent.
Tastiger,
Can you ask your hosting provider support about some cache layers or web-accelerators installed on your host? i mean  something like varnish, phpaccelerator, apc etc
I guess it can conflict with AbanteCart caching.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline tastiger

  • Newbie
  • *
  • Posts: 32
  • Karma: +8/-0
    • View Profile
    • Tassie Vapes
Re: Cache file and folder permissions and 777
« Reply #9 on: December 16, 2015, 03:15:53 PM »
Thank you Abolabo,
The host is being really supportive so I will ask this question.
I do no apc is not running as I checked for that.

In the meantime we have change the expire to seven days as an experiment to see if it is to do with delete and and as a way of seeing clearer what activity is causing problems over time.
So far it has dramatically alleviated frequency of errors and enabled the finding of a 'stuck' language file that was not deleting.

-Mark
After a long search I found AbanteCart Cart, I found possibilities!

Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #10 on: December 25, 2015, 08:56:34 PM »
Mark,

I took a break from AbanteCart due to the holiday so just got a chance to read your latest post.  The code you posted is interesting, but it confirms to me that I'd rather spend my time designing new products for my business than studying & developing code. As much as I enjoy troubleshooting errors -- because that's how I learn -- I really don't want to spend as much time as would be required to get to speed on all the minutiae of coding. I guess I'm not as nerdy as I thought! And the last thing I want to do is have this affect my customer experience while I'm trying to fix a bug or find a solution here on the forums.

So, I've been playing with the Shopify trial, too, during the past ten days or so and I like it. The Facebook & Pinterest features I mentioned allow a customer to purchase my products from within Facebook or Pinterest though the Shopify integrations, so a customer doesn't have to leave those sites at all to purchase from me. It's a convenience for my customers. I know people spend more time on those sites than mine, unfortunately.  :-\

I get what you're saying. I'd rather have a customer on my site 100% (where I have complete control of my brand "message") than trying to sell to them on FB or Pinterest. But I want to reach my customers wherever they are and I won't know if the integrations are good or not unless I try.  :P

Two big things I don't like about Shopify are:
1) I can't use my domain's SSL cert. Customers will have to checkout through something like "shopify.com/mydomain" unless I pay for an "enterprise" plan, which is over $1,000/month. Ridiculous and no way a small business like mine can afford it.
2) Email: I have to pay for email service through a third party (like Google Apps) for custom / domain email forwarding.

But I am willing to accept these shortcomings because I know a lot of my customers spend time on FB & Pinterest and I want to see if it's worth reaching them using a service like Shopify.

I might sound like a shill for Shopify, but I know it's not perfect. I really would prefer a solution like AbanteCart. When Pinterest was launching their "buy" button, I actually signed up for their "waiting / wish list" requesting AbanteCart as a partner. But I guess big sites like FB & Pinterest won't support AbanteCart's platform until it gets more popular and is more stable. I don't see that happening for a while.

If I were a dedicated web developer I'd try to work on such an extension for AbanteCart to work directly within FB, Pinterest, or Instagram but unfortunately this is beyond my capabilities. I hope someone on these boards sees this and makes it happen, in which case I'd stick with it.

So I'll keep up with AbanteCart as much as I can. I'd recommend it to people. It's just that I really am itching to try those FB & Pinterest integrations.

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #11 on: December 26, 2015, 01:17:12 AM »
Your post sounds valid to me...I think Facebook and Pinterest must have a partnership or something with Shopify for them to do this since I don't believe it's possible to integrate a "BUY Now" button on Facebook currently (they block all html code I think, if someone knows how, let me know!).

It's also something Facebook has tried to do in the past (shopping/commerce) and I assume, something they will do/get into again in the future meaning if they don't have a partnership with shopify, they will shutdown or close it off IMO.

Having sold on marketplaces before personally to the tune of a few hundred k per year, the downside as you may have read is that you don't have as much control so if someone (eBay etc...) makes a change, your business can be shut down pretty much overnight.  Also, I've noticed when selling this way, people don't really know it's really your store...they think they are buying from, say eBay or Amazon or (I'm totally assuming here, Shopify...especially if they help you collect payment or like you say, have shopify.com in your domain name).

Maybe it's better if it's "your" Facebook page, but at the end of the day, since you have very limited control, it can get closed/shutdown as well if you sell something someone else is willing to pay Facebook or Pinterest more for (eg: Amazon shutting down sales of google streaming devices) and ultimately, having read a lot of ecommerce articles, I think these other companies are ultimately there to help "them", not you...

I agree that development is a pain and it's a lot more work, but I think all the carts or anything would take some time to get up and running...

All that said, I do wish you the best of luck and if you have time, let us know how the integration deployment goes with shopify/facebook/pinterest since I'd assume a lot of people are in the same boat and would like to have a buy now button on facebook (but just point back to our existing store!).



Offline stronso

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #12 on: December 26, 2015, 09:06:52 PM »
Hi webdevmerc,

Yes, Shopify is a partner with Facebook, Pinterest and now Twitter, too.  To be clear, it allows a customer to buy your products WITHIN those sites. Not a redirect. It's a convenience to a customer because they don't have to leave those social media sites to buy. Checkout is done within FB/Pinterest/Twitter. I'm curious to try it and see how it works.

As far as getting shutdown like eBay or Amazon, I think the risk is low for my business model since I sell my own unique designs. But I do agree that FB/Pinterest/Twitter mainly want to keep users on those sites, not have them leave. So it benefits them (perhaps) more than me. I understand that. I just want to test those features to see if the added customer convenience leads to greater sales overall, in which case I'd be happy with that kind of trade.

I've said it before: I like AbanteCart a lot. It's got a lot of great features right out of the box. It's been fairly easy to configure, even for a "newbie" like me. I think a lot of the problems I've been having are server (host) related. When I talk to Arvixe support, they are not too helpful in resolving AbanteCart issues. That's very frustrating for me. If I had more web skills and time to spend on configuring & customizing AbanteCart, I'd do it. Maybe when my business gets bigger I can hire a web developer to do all the back-end stuff. Right now, I can't do it with all the other things I need to do to run my business.

I'll do my best to post my experience here. I'll certainly come back to AbanteCart if I hate Shopify.  8)

Thanks again for your input. It's appreciated.
Alonso
xochico.com

Offline www.PiShop.co.za

  • Newbie
  • *
  • Posts: 31
  • Karma: +7/-0
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #13 on: December 30, 2015, 03:36:02 PM »
I'm also having the Incorrect cache files permissions problem; anbody found a fix yet?

Thanks

Offline webdevmerc

  • Full Member
  • ***
  • Posts: 172
  • Karma: +32/-1
    • View Profile
Re: Cache file and folder permissions and 777
« Reply #14 on: December 30, 2015, 03:44:58 PM »
Hi webdevmerc,

Yes, Shopify is a partner with Facebook, Pinterest and now Twitter, too.  To be clear, it allows a customer to buy your products WITHIN those sites. Not a redirect. It's a convenience to a customer because they don't have to leave those social media sites to buy. Checkout is done within FB/Pinterest/Twitter. I'm curious to try it and see how it works.

As far as getting shutdown like eBay or Amazon, I think the risk is low for my business model since I sell my own unique designs. But I do agree that FB/Pinterest/Twitter mainly want to keep users on those sites, not have them leave. So it benefits them (perhaps) more than me. I understand that. I just want to test those features to see if the added customer convenience leads to greater sales overall, in which case I'd be happy with that kind of trade.

I've said it before: I like AbanteCart a lot. It's got a lot of great features right out of the box. It's been fairly easy to configure, even for a "newbie" like me. I think a lot of the problems I've been having are server (host) related. When I talk to Arvixe support, they are not too helpful in resolving AbanteCart issues. That's very frustrating for me. If I had more web skills and time to spend on configuring & customizing AbanteCart, I'd do it. Maybe when my business gets bigger I can hire a web developer to do all the back-end stuff. Right now, I can't do it with all the other things I need to do to run my business.

I'll do my best to post my experience here. I'll certainly come back to AbanteCart if I hate Shopify.  8)

Thanks again for your input. It's appreciated.
Alonso
xochico.com


Lastly, I was just wondering what happens if the buyer has a problem?  Does shopify pretty much refund them no questions asked (sorta like Amazon a-to-z guarantee or eBay Buyer protection?).  Technically, I don't think the solution to integrate is hard (they just block it), but it's these problem areas where they want to prevent scammers, but also protect buyers (more so than sellers normally)...where as a store owner, might be a hassle if you lose all control to prevent scammers buying from your site.


 

Powered by SMFPacks Social Login Mod