I'm rewiring an old house where I've already installed a 50 amp sub-panel. Now the carpenter decided to put his attic access in the ceiling right above the panel is this permissible.
As Steven said, it depends on the applicable code. I doubt any code is going to be that specific. So it will be up to the local authority having jurisdiction to interpret what the code does say and decide if it applies to your situation. As such, no one here can accurately answer this unless they happen to represent your LAHJ.
For example, the NEC simply says that over-current devices be readily accessible. Readily accessible in part is defined as devices need to be able to be quickly operated without the need to remove any obstacles. So the attic access alone would seem to comply as it does not affect access to the breakers.
However, to effectively use an attic access, one must place a ladder, which could block access to the breakers, requiring removal before operation is possible. This would cause the panel location to not comply.
In cases of contradicting interpretations, the LAHJ must decide what interpretation best represents the code's intent. Since access to breakers could be most important when someone is working in the attic with a ladder in place, I personally would rule that this arrangement is not in compliance. But I am not your LAHJ.
The short answer is you have to ask your electrical inspector.
i think your biggest concern is that NO WIRES be run on tops of joists within Six feet of an attic access. good luck with THAT one!