CPU in cabinet: bad idea?

I recently bought a desk that has a cabinet for the CPU. I leave the computer on all day, and I noticed that the fan runs constantly, and it is warm in the cabinet. Is that harmful for the CPU over the long run?

If so, will drilling large holes (several inches in diameter) make a difference, or should I just take it out of the cabinet?

Over the long run, yes it can be harmful. It would more specifically depend on if you’re doing things on the computer to make the processor and power supply run at full force. If so then yes over the long run, yes it probably is shortening the lifespan of some of the various components that make up a computer.

Drilling holes will make a big difference. It will make an even bigger difference if you have inlet holes and outlet holes and a fan over one of them.

The slightly inaccurate but good enough to give you a rough idea of what is going on rule of thumb for this sort of thing is that every 10 deg C over room temperature cuts the expected life in half.

I’d take it out of the cabinet or remove the rear panel. Most computer desks don’t have a back panel. If it gets too hot you will ruin your computer.

It’s trivial to remove the back panel - a well constructed desk shouldn’t need it. That’s what I did for my parents’ desk when I heard their computer fan fighting desperately for air.