Meats, and virtually anything else, are safe to eat indefinitely in cans. The taste will go off and be stale, but the food is safe to eat as long as the can is intact and not bulged.
For the ground coffee, same thing. It's safe to brew indefinitely. It's going to taste stale between a month or two after roasting until forever. After about a year, it's not going to get any staler. Check for mold when you open it (which there shouldn't be because no moisture from outside) and you are good. If you are looking for long term storage, your best bet is buying green coffee beans and roasting them when you are ready to start using them.
Do you know how long would green beans be shelf stable?
Dry packed and shaken/stirred every couple of months, a year without staling. Vacuum packed, 10+ years without staling.
Kept dry, it's a dry bean and is safe to eat indefinitely (or at least in a normal human lifetime) just like pintos, rice and wheat berries. It won't be as tasty after 20 years, but it won't be unsafe.
(post is archived)