Context. Nearly all contemporary theoretical research on cometary dust activity relies on models depicting heat transfer and sublimation products within the near-surface porous layer. Gas flow exerts a pressure drag to the crust agglomerates, counteracting weak gravity and the tensile strength of that layer. Our interpretation of data from the Rosetta mission, and our broader comprehension of cometary activity, hinges significantly on the study of this process. Aims. We investigate the role played by the structure of the near-surface porous layer and its associated resistance to gas flow, tensile strength, pressure distribution, and other characteristics in the scenario of the potential release of dust agglomerates and the resulting dust activity. Methods. We employ a thermophysical model that factors in the microstructure of this layer and radiative heat conductivity. We consider gas flow in both the Knudsen and transition regimes. To accomplish this, we use methods such as test-particles Monte Carlo, direct-simulation Monte Carlo, and transmission probability. Our study encompasses a broad spectrum of dust-particle sizes. Results. We evaluated the permeability of a dust layer composed of porous aggregates in the submillimetre and millimetre ranges. We carried out comparisons among various models that describe gas diffusion in a porous dust layer. For both the transition and Knudsen regimes, we obtained pressure profiles within a non-isothermal layer. We discuss how the gaps in our understanding of the structure and composition could impact tensile strength estimates. We demonstrate that for particles in the millimetre range, the lifting force of the sublimation products of water ice is adequate to remove the layer. This scenario remains feasible even for particles on the scale of hundreds of microns. This finding is crucial as the sublimation of water ice continues to be the most probable mechanism for dust removal. Conclusions. This study partially overturns the previously held, pessimistic view regarding the possibility of dust removal via water sublimation. We demonstrate that a more precise consideration of various physical processes allows elevation of the matter of dust activity to a practical plane, necessitating a fresh quantitative analysis.