Oh Jane, no, my son is not allowed to do this. The snack cupboard has always been within reach, but he knows-- anything he gets out without asking goes away for the rest of the day. Sweets and treats are kept up high, but popcorn, crackers, almonds, raisins, etc. are accessible-- but he *knows* that he is not allowed to do this.
You have to treat this as a discipline issue, with a consequence and a lot of consistency. If you don't allow it, simply *do not allow it*. Let your older one know that this is "sneaking food" and that if he sneaks, he loses privileges. My son snuck candy off the old gingerbread house and lost tv and sweets for a week. No repeat incident as of yet. He knows that if he sneaks food again, he will lose his Legos, sweets and tv time for a week. I don't tolerate this behavior and he *knows* what's expected. Sneaking is dishonest, too. This is like stealing.
My cue to my son (nearly 6) if he starts to look in the cupboard is "no shopping--- if you are hungry, you may ask for a snack." That said, he IS invited, and quite often, to "pick one thing from the cupboard you'd like on your plate" and then I serve the portion which I deem reasonable. Because I invite him to do this fairly often, it's not forbidden or exciting.
You may want to start there with your son, letting him know the new expectations, consequences, and that there will be times that he will be invited to choose a snack-- but that he can only do this when invited. Any sneaking/helping himself-- and there's a consequence immediately.
Good luck!